You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+70-7Lines changed: 70 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,26 @@ Pass: secret
32
32
33
33
We have created a number of custom commands for the project. The commands are listed below with a brief about their use of it.
34
34
35
+
## Install / Setup
36
+
37
+
Run the interactive setup wizard for a fresh project. It copies `.env`, generates an app key, configures the database, runs migrations, seeds data, creates the storage link, and builds frontend assets.
38
+
39
+
```bash
40
+
php artisan starter:install
41
+
```
42
+
43
+
Use `--skip-npm` to skip the frontend build, `--demo` to seed demo data without prompting, or `--skip-db` if the database is already set up.
44
+
45
+
## Update
46
+
47
+
After pulling changes from the repository, run:
48
+
49
+
```bash
50
+
php artisan starter:update
51
+
```
52
+
53
+
This runs `composer update`, checks for new module migrations, runs outstanding migrations, and clears all caches.
54
+
35
55
## Create New module
36
56
37
57
To create a project use the following command, you have to replace the MODULE_NAME with the name of the module.
@@ -140,18 +160,61 @@ It is a modular application, and some modules are installed by default. It will
140
160
141
161
Follow the steps mentioned below to install and run the project. You may find more details about the installation in [Installation Wiki](https://github.com/nasirkhan/laravel-starter/wiki/Installation).
142
162
143
-
1. Open the terminal and run the following command, this will download and install the `Laravel Starter` and run the post-installation commands.
163
+
### From GitHub Template (recommended)
164
+
165
+
If you created a new repository from this GitHub template, or cloned it directly:
166
+
167
+
```bash
168
+
# 1. Install PHP dependencies
169
+
composer install
170
+
171
+
# 2. Run the interactive setup wizard — handles .env, database, migrations, seeding, and npm assets
172
+
php artisan starter:install
173
+
```
174
+
175
+
Or as a single shortcut after `composer install`:
176
+
177
+
```bash
178
+
composer setup
179
+
```
180
+
181
+
For a true one-liner from a fresh clone, convenience scripts are included:
182
+
183
+
```bash
184
+
# Linux / macOS
185
+
bash setup.sh
186
+
187
+
# Windows (PowerShell)
188
+
.\setup.ps1
189
+
```
190
+
191
+
Both scripts run `composer install` and then launch `php artisan starter:install`.
192
+
Pass any `starter:install` flags through, e.g. `bash setup.sh --demo`.
193
+
194
+
The setup wizard will guide you through environment configuration, database selection, migrations, seeding, and building frontend assets. When finished it prints the app URL and default login credentials.
195
+
196
+
**Available options:**
197
+
198
+
| Option | Description |
199
+
|---|---|
200
+
|`--skip-db`| Skip database setup |
201
+
|`--skip-seed`| Skip database seeding |
202
+
|`--skip-npm`| Skip `npm install` and asset build |
203
+
|`--demo`| Seed with demo data (no prompt) |
204
+
205
+
### Via Composer create-project
206
+
144
207
```bash
145
208
composer create-project nasirkhan/laravel-starter
146
209
```
147
-
2. The default database is `sqlite`, if you want to change please update the database settings at `.env` file
148
-
3. To create a link from the storage directory, run the following command from the project root:
149
-
```php
150
-
php artisan storage:link
210
+
211
+
This runs migrations automatically. Afterwards run the setup wizard to seed and build assets:
212
+
213
+
```bash
214
+
php artisan starter:install --skip-db
151
215
```
152
-
4. If you run the `create-project` command from `Laravel Hard` then the site will be available at [http://laravel-starter.test](http://laravel-starter.test). You may create a virtualhost entry to access the application or run `php artisan serve` from the project root and visit `http://127.0.0.1:8000`
153
216
154
-
*After creating the new permissions use the following commands to update cashed permissions.*
217
+
*After creating the new permissions use the following commands to update cached permissions.*
0 commit comments