• Stars
    star
    1,631
  • Rank 28,685 (Top 0.6 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Laravel 9.0 blog application with Hotwire, Homestead, Horizon, Telescope and Pusher

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.

More Repositories

1

todolist-frontend-vuejs

Front-end application for Todolist Web application built with Laravel and Vue.js
JavaScript
142
star
2

vue-scroll-progress-bar

Vue.js plugin for page scroll progress bar
JavaScript
85
star
3

traefik-docker-ansible

๐Ÿณ ๐Ÿน ย This is an Ansible playbook to install multiple Web applications on a single Ubuntu server with Docker and Traefik.
HTML
84
star
4

traefik-custom-error-pages

Bunch of custom error pages for Traefik 2.x built with Jekyll
CSS
73
star
5

modern-datatables

They are many ways to build reactive web interfaces but do we really need to add the complexity of JavaScript frameworks like Vue.js or React?
Ruby
70
star
6

todolist-backend-laravel

Back-end application for Todolist Web application built with Laravel 5.8 and Vue.js
PHP
69
star
7

jsonapi-scopes

This gem allows you to filter and sort an ActiveRecord relation based on a request, following the JSON:API specification as closely as possible.
Ruby
33
star
8

todolist-frontend-nuxt

Front-end application for Todolist Web application built with Laravel and Nuxt.js
Vue
26
star
9

json-api-response-converter

Normalize your JSON:API response
JavaScript
21
star
10

turbo-frames-debug

Small package to help you debug your turbo-frames.
CSS
20
star
11

homelab-docker-ansible

๐Ÿ“บ My home lab configuration
17
star
12

rails-vue-cli

Rails and Vue CLI in the same project without Webpacker.
Ruby
17
star
13

dotfiles

๐Ÿ’ป This is my dotfiles for my system customizations and to setup my development environment
Shell
15
star
14

selfhosted-services

Ansible role to deploy my self hosted services with Docker and Traefik
14
star
15

Amazon-Affiliate-Link-Generator

Website to auto generate Amazon affiliate links with your tag and with bitly url shortener
HTML
13
star
16

switch-to-localhost

Web Extension to switch your URL to localhost
HTML
12
star
17

external_link_to

Rails link_to wrapper for external links.
Ruby
9
star
18

webpack-boilerplate

Webpack 4 boilterplate with Babel, SASS, PostCSS, Vue, Tailwind and Pug
JavaScript
8
star
19

rails-vitejs

This project shows how to build an application with both Rails and Vite.js in the same repo.
Ruby
7
star
20

rails-tailwindcss-starter

Rails 5.2 Starter project with Tailwindcss built in
Ruby
5
star
21

lobsters-docker

Lobsters in a Docker container
Dockerfile
4
star
22

custom-element-password-toggle

๐Ÿ”’ This component is a Custom Element written in pure vanilla JavaScript. It's designed to toggle the password visibility in an easy way.
HTML
4
star
23

switch-to-admin

Web Extension to switch current tab to your admin section.
HTML
3
star
24

rails-place

r/place clone built with Rails and Hotwire
Ruby
3
star
25

docker-ruby-node

Dockerfile
2
star
26

upgrade-webpacker-5-to-6

How to upgrade from Webpacker 5 to Webpacker 6 with Vue and Sass.
Ruby
2
star
27

Sass-Mixin-Triangle-Shadow

Mixin Sass pour gรฉnรฉrer des triangles avec une ombress
CSS
2
star
28

traefik-file-config-example

Example configuration for File provider in Traefik.
JavaScript
2
star
29

slider-jquery

Plugin Slider
JavaScript
2
star
30

rails-hotwire-dashboard

You don't need React to build reactive applications
Ruby
2
star
31

react-with-custom-elements

โš›๏ธ Rendering React components with Custom Elements
PHP
1
star
32

Rails-token-authentication-demo

Ruby
1
star
33

dpi.js

JavaScript
1
star
34

guillaumebriday

1
star
35

youarenotfacebook

Developers, please don't act like you're Facebook.
HTML
1
star
36

minium-summary

PHP
1
star