

GitHub - guillaumebriday/laravel-blog: Laravel 5.5 blog example project with goo...
source link: https://github.com/guillaumebriday/laravel-blog
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Laravel 8.0 blog
The purpose of this repository is to show good development practices on Laravel as well as to present cases of use of the framework's features like:
Beside Laravel, this project uses other tools like:
Some screenshots
You can find some screenshots of the application on : https://imgur.com/a/Jbnwj
Installation
Development environment requirements :
Setting up your development environment on your local machine :
$ git clone https://github.com/guillaumebriday/laravel-blog.git $ cd laravel-blog $ cp .env.example .env $ composer install $ vagrant up $ vagrant ssh
All following commands must be run inside the VM:
$ cd code $ yarn install $ artisan key:generate $ artisan horizon:install $ artisan telescope:install $ artisan storage:link
Now you can access the application via http://localhost:8000.
There is no need to run php artisan serve
. PHP is already running in the dedicated virtual machine.
Before starting
You need to run the migrations with the seeds :
$ artisan migrate --seed
This will create a new user that you can use to sign in :
email: [email protected] password: 4nak1n
And then, compile the assets :
$ yarn dev # or yarn watch
Starting job for newsletter :
$ artisan tinker > PrepareNewsletterSubscriptionEmail::dispatch();
Useful commands
Seeding the database :
$ artisan db:seed
Running tests :
$ ./vendor/bin/phpunit --cache-result --order-by=defects --stop-on-defect
Running php-cs-fixer :
$ ./vendor/bin/php-cs-fixer fix --config=.php_cs --verbose --dry-run --diff
Generating backup :
$ artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider" $ artisan backup:run
Generating fake data :
$ artisan db:seed --class=DevDatabaseSeeder
Discover package
$ artisan package:discover
In development environnement, rebuild the database :
$ artisan migrate:fresh --seed
Accessing the API
Clients can access to the REST API. API requests require authentication via token. You can create a new token in your user profile.
Then, you can use this token either as url parameter or in Authorization header :
# Url parameter GET http://laravel-blog.app/api/v1/posts?api_token=your_private_token_here # Authorization Header curl --header "Authorization: Bearer your_private_token_here" http://laravel-blog.app/api/v1/posts
API are prefixed by api
and the API version number like so v1
.
Do not forget to set the X-Requested-With
header to XMLHttpRequest
. Otherwise, Laravel won't recognize the call as an AJAX request.
To list all the available routes for API :
$ artisan route:list --path=api
Contributing
Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.
License
This project is released under the MIT license.
Recommend
-
83
README.md Laravel + Vue CLI 3 This demo assumes you are serving this Laravel app via Valet at laracon.test. If you are serving the laravel...
-
63
README.md Vue.js and Go example project Mathematical operations with Go (Golang) and Vue.js. See the dem...
-
5
Sane Laravel 5 Mail Example May 7, 2015For some reason, the example code in the Laravel docs for their Mail f...
-
16
November 21, 2020 Upload Image To Database Using Laravel Tutorial With ExampleWith Laravel, you can forget...
-
26
Kotlin Multiplatform Mobile Sample This is a Kotlin Multiplatform Mobile (KMM) Project. It includes iOS and Android applications with a native UI and a module with code shared on iOS and Android. Features
-
12
In this tutorial, we are going to create a simple registration form using Laravel. But we are not going to use the default validation method for our form.We are going to use Livewire with Larave...
-
12
NextAuth.js Example App Open Source. Full Stack. Own Your Data. Overview NextAuth.js is a complete open source authentication solution for Next.js applications. Th...
-
6
ScriptExtensionLayerExample Example project on embedding a JavaScript engine in a rust project. What we want is to embed a script engine which can receive events which occur in our rust app and add functionality by using javas...
-
3
wsk.example A sample starter project using wsk. View at: https://bloomberg.github.io/wsk.example ...
-
11
THIS REPOSITORY IS DEPRECATED Note: This example is outdated. It's now recommended to scaffold your project with Vue CLI 3 which provides out-of-the-box configurations for unit testin...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK