Skip to content

Commit 620a5e3

Browse files
authored
Create docs site
2 parents e4734f6 + 68533de commit 620a5e3

File tree

77 files changed

+23157
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+23157
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
.DS_Store
33
vendor/
44
composer.lock
5+
6+
.vscode/
7+
.node_modules/

docs/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

docs/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/docs/available-commands.md

Lines changed: 593 additions & 0 deletions
Large diffs are not rendered by default.

docs/docs/configurations.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
sidebar_position: 5
3+
title: Configurations
4+
---
5+
6+
## Configurations
7+
8+
Laravel-Code-Generator ships with lots of configurable option to give you control of the generated code. It is strongly recommended that you read the comments block above each option in the config/laravel-code-generator.php file to get familiar with all available options.
9+
10+
To override or extend the default settings to prevent you from losing your setting when upgrading the package. The `config/laravel-code-generator.php` is a dedicated file to store your options. This file will always be controlled by you and will never be overridden by the package. To override any configuration found in `config/laravel-code-generator.php`, simple add the same option in your custom file. The generator will look at the your configuration before falling back to the default config. Note, any array based option will be extended not overridden.
11+
12+
:::info
13+
If you like to override default settings, you may execute the following command to publish a default configuration file to `/config/laravel-code-generator.php`
14+
15+
```
16+
php artisan vendor:publish --provider="CrestApps\CodeGenerator\CodeGeneratorServiceProvider" --tag=config
17+
```
18+
:::
19+
20+
The most important option in the configuration file is `common_definitions`. This option allows you to set the default properties of new field using the name of that field. Your goal should be to generate 100% ready resource-file using this config. It will save you lots of time since all your fields will get generated using the desired properties. In another words, when using `resource-file:create`, `resource-file:append` or `resource-file:from-database` to create resource file, the generated JSON will be 100% ready for you without any manual modification.

docs/docs/get-started.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
sidebar_position: 2
3+
title: Getting Started
4+
---
5+
6+
# Getting Started
7+
8+
### Installation
9+
10+
1. To download this package into your Laravel project, use the command-line to execute the following command
11+
12+
```
13+
composer require crestapps/laravel-code-generator --dev
14+
```
15+
16+
2. (You may skip this step when using Laravel >= 5.5)** To bootstrap the packages into your project while using command-line only, open the app/Providers/AppServiceProvider.php file in your project. Then, add the following code to the `register()` method.
17+
18+
```
19+
if ($this->app->runningInConsole()) {
20+
$this->app->register('CrestApps\CodeGenerator\CodeGeneratorServiceProvider');
21+
}
22+
```
23+
24+
#### Optional Steps
25+
26+
If you like to override default settings, you may execute the following command to publish a default configuration file to `/config/laravel-code-generator.php`
27+
28+
```
29+
php artisan vendor:publish --provider="CrestApps\CodeGenerator\CodeGeneratorServiceProvider" --tag=config
30+
```
31+
32+
If you like to override the default template, you may execute the following command to publish the default template to `/resources/laravel-code-generator/templates/default`
33+
34+
```
35+
php artisan vendor:publish --provider="CrestApps\CodeGenerator\CodeGeneratorServiceProvider" --tag=default-template
36+
```
37+
38+
### Demo
39+
40+
Below a video to demonstrate how to use most of the package commands.
41+
42+
<iframe width="840" height="472" src="https://www.youtube.com/embed/l21qNcsMAWg?si=RbBsmeN06mq-o_5n" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
43+

docs/docs/intro.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
sidebar_position: 1
3+
title: Introduction
4+
---
5+
6+
## CrestApps - Laravel Code Generator
7+
8+
### Introduction
9+
10+
Enhance your Laravel development experience with our sophisticated code generator! This powerful tool is designed to streamline your workflow and save you valuable time. Whether you need to create views, controllers, routes, migrations, languages, or request forms, this versatile generator has got you covered – all in just seconds!
11+
12+
Experience the ultimate flexibility and customization options to cater to a wide range of use cases. Our code generator comes with a cross-browser compatible template and includes client-side validation to bring a modern touch to your application.
13+
14+
Explore the project's source code on [GitHub](https://github.com/CrestApps/laravel-code-generator), available under the permissive [MIT license](https://opensource.org/licenses/MIT). Upgrade your Laravel development with efficiency and style!
15+
16+
17+
### Features
18+
19+
- Craft clean, reusable, and highly readable code for seamless development.
20+
- Generate complete resources effortlessly with a single command, supporting both migration and existing database scenarios.
21+
- Streamline resource creation for all existing database tables with a single command.
22+
- Save and recreate fields using a JSON file, ensuring adaptability to changing business needs.
23+
- Leverage JSON-based resource files for easy regeneration, even when business rules evolve.
24+
- Generate standard CRUD controllers with simple or form-request validation.
25+
- Customize view templates to alter the standard look and feel of your application.
26+
- Create models with relations for comprehensive data representation.
27+
- Establish named routes with and without grouping for efficient navigation.
28+
- Generate standard CRUD views to facilitate a consistent user experience.
29+
- Smart migration engine tracks generated migrations to only create necessary ones.
30+
- Intelligent handling of model relations to simplify development.
31+
- Highly flexible with rich configurable options to suit diverse needs.
32+
- Easy commands for resource-file creation, addition, or reduction.
33+
- Full support for generating multi-language applications.
34+
- Implement client-side validation for enhanced user interaction.
35+
- Efficiently handle file uploading and store multiple responses in the database.
36+
- Generate form-request to clean up controllers and boost code reusability.
37+
- Create view layouts with and without client-side validation.
38+
- Change templates at runtime for diverse view generation.
39+
- Ability to generate views with or without Laravel-Collective integration.
40+
- Seamless handling of date, time, or datetime fields.
41+
- Automatic management of boolean fields for hassle-free development.
42+
43+
44+
### Dependencies
45+
46+
#### Prerequisite
47+
48+
- **[Laravel >= 5.1 framework.](https://laravel.com/)**
49+
- **[Composer](https://getcomposer.org/)** installed on your local workstation.
50+
51+
#### Default template dependencies
52+
53+
- **[CSS bootstrap Framework.](http://getbootstrap.com/)** This is only required with the default template. You are free to make your own template.

docs/docs/release-notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
sidebar_position: 6
3+
title: Release Notes
4+
---
5+
6+
## Release Notes
7+
8+
- Upgraded the default theme to use Bootstrap 5.3.
9+
- Improved the controller templates.
10+
- Dropped support for Laravel-Collective Template.

0 commit comments

Comments
 (0)