• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

guillaumebriday/laravel-blog: Laravel 9.0 blog application with Vue.js, Homestea ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

guillaumebriday/laravel-blog

开源软件地址(OpenSource Url):

https://github.com/guillaumebriday/laravel-blog

开源编程语言(OpenSource Language):

PHP 81.8%

开源软件介绍(OpenSource Introduction):

Laravel 9.0 blog

Build Status Donate

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 :

$ artisan test

Running Laravel Pint :

$ ./vendor/bin/pint --verbose --test

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
laravel/lumen-framework: The Laravel Lumen Framework.发布时间:2022-07-07
下一篇:
antonioribeiro/tracker: Laravel Stats Tracker发布时间:2022-07-09
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap