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
[](https://packagist.org/packages/:vendor_slug/:package_slug)
This repo can be used to scaffold a Laravel package. Follow these steps to get started:
3
+
[](https://packagist.org/packages/jornatf/laravel-route-generator)
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
24
-
25
-
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
12
+
> #### If you like this package you can [Buy me a Coffee](https://www.buymeacoffee.com/jornatf) ☕️
To start and depending on the configurations, you must create in `resources\views`, the folder with the same name as the value of `view_base_path` (default: `static`).
73
+
74
+
Then you'll have:
75
+
```
76
+
resources/
77
+
├─ views/
78
+
│ ├─ static/
79
+
│ │ ├─ about.blade.php
80
+
│ │ ├─ contact.blade.php
59
81
```
60
82
61
-
## Usage
83
+
Here the routes will be generated:
84
+
85
+
| Method | URL | Route name |
86
+
|---|---|---|
87
+
| GET | /about | static.about |
88
+
| GET | /contact | static.contact |
89
+
90
+
You can then check the generation of the routes with the Artisan command:
91
+
```
92
+
php artisan generated-route:list
93
+
```
94
+
95
+
### Prefix
96
+
97
+
You can add prefix to your route group in the config file, like this:
98
+
```php
99
+
'url_prefix' => 'my_prefix',
100
+
```
101
+
102
+
### Middlewares
62
103
104
+
You can add middlewares to your route group in the config file, like this:
63
105
```php
64
-
$variable = new VendorName\Skeleton();
65
-
echo $variable->echoPhrase('Hello, VendorName!');
106
+
'middlewares' => ['auth:sanctum'],
66
107
```
67
108
68
109
## Testing
@@ -73,21 +114,21 @@ composer test
73
114
74
115
## Changelog
75
116
76
-
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
117
+
> Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
77
118
78
119
## Contributing
79
120
80
-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
121
+
> Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
81
122
82
123
## Security Vulnerabilities
83
124
84
-
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
125
+
> Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
0 commit comments