Skip to content

ZachWatkins/laravel-template

Repository files navigation

Laravel Template

$ sail artisan inspire

“ It is not the man who has too little, but the man who craves more, that is poor. ”
— Seneca

This application is a starting point for building an authenticated API with the Laravel PHP framework.

Local System Requirements

  1. Docker Desktop
  2. PHP and Composer: $ bin/install-php
  3. (Windows) Windows Subsystem for Linux and Ubuntu: $ bin/install-wsl

Installation

  1. Clone the repository: $ git clone https://github.com/zachwatkins/laravel-template
  2. Open the project directory: $ cd laravel-template
  3. Run the repository initialization script: $ bin/once

Features

Laravel first-party packages and features:

  1. Breeze (Laravel Package) for user registration, login, authentication, and profile management. Also includes PHPUnit tests for authentication features.
  2. Sanctum (Laravel Package) for API authentication and token management.
  3. Sail (Laravel Package) for local development.
  4. Queues for performing tasks asynchronously.
  5. Migrations for database schema management.
  6. Tests for peace of mind.

My own features:

  1. User Storage Scope shows how to store each user's files in their own folder.
  2. Generic Model Class demonstrates how Laravel registers, creates, and retrieves database table records.

Routes

Public Web Routes

| Verb | URI | Action | Route Name | GET | / | view | welcome

Guest Web Routes

| Verb | URI | Action | Route Name | GET | /register | create | register | POST | /register | store | - | GET | /login | create | login | POST | /login | store | - | GET | /forgot-password | create | password.request | POST | /forgot-password | store | password.email | GET | /reset-password | create | password.reset | POST | /reset-password | store | password.update

Authenticated Web Routes

| Verb | URI | Action | Route Name | GET | /verify-email | create | verification.notice | GET | /verify-email/{id}/{hash} | create | verification.verify | POST | /verify-email/{id}/{hash} | store | - | POST | /verify-email-notification | store | verification.send | GET | /confirm-password | create | password.confirm | POST | /confirm-password | store | - | PUT | /password | update | password.update | POST | /logout | destroy | logout | GET | /dashboard/ | view | dashboard | GET | /profile | view | profile.edit | PATCH | /profile | update | profile.update | DELETE | /profile | destroy | profile.destroy

Authenticated API Routes

| Verb | URI | Action | Route Name | GET | /api/user | closure | - | GET | /models | index | photos.index | GET | /models/create | create | photos.create | POST | /models | store | photos.store | GET | /models/{id} | show | photos.show | GET | /models/{id}/edit | edit | photos.edit | PUT/PATCH | /models/{id} | update | photos.update | DELETE | /models/{id} | destroy | photos.destroy

Development

Laravel Sail

This application uses Laravel Sail for local development. Laravel Sail is a Docker-based development environment for Laravel. It provides a minimal Linux environment with all of the services and features you need to develop a Laravel application.

If you are using Windows and want to run the application locally, you will need to install Windows Subsystem for Linux.

URLs

http://localhost:80 (Web) http://localhost:8025 (Mailpit)

Documentation

(Laravel Documentation)[./docs/laravel/]

About

Template repository for Laravel

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published