Skip to content

Latest commit

 

History

History
126 lines (96 loc) · 2.87 KB

laravel.md

File metadata and controls

126 lines (96 loc) · 2.87 KB

Wiki - Development - Laravel

development laravel

Introduction

Table of contents

General documentation

Directoy Structure

.
+-- app
|   +-- Http
|   |   +-- Controllers
|   |   |   +-- Controller.php
|   |   +-- Middleware
|   |       +-- VerifyCsrfToken.php
|   +-- [Model].php
|
+-- database
|   +-- migrations
|       +-- date_filename.php
|
+-- public
|   +-- css
|   |   +-- app.css
|   +-- js
|   |   +-- app.js
|   +-- index.php
|
+-- recourses
|   +-- js
|   +-- sass
|   +-- views
|       +-- welcome.blade.php
|
+-- routes
|   +-- web.php

Starting

  1. Create new project laravel new [projectname]
  2. Edit the .env. file

Routing

CRUD

  • GET /projects -> index (all projects)
  • GET /projects/1 -> show (1 project)
  • GET /projects/create -> create (create form)
  • POST /projects -> store (insert project)
  • GET /projects/1/edit -> edit (edit project)
  • PATCH /projects/1 -> update (update project)
  • DELETE /projects/1 -> destory (delete project)

Artisan

  • Create controller: php artisan make:controller [-r] [ControllerName] [-m] [Model]
  • Create migration: php artisan make:migration [create_example_table]
  • Create model: php artisan make:model [Name]
  • Maintenance Mode: php artisan down

Tinker

  • php artisan tinker

Migrations

Database version control.

  • php artisan migrate install
  • php artisan migrate:rollback
  • Drop all tables: php artisan migrate:fresh

Tutorials

Defenition

  • Todo: 🕐
  • Doing: ⌛
  • Done: ✅

Samples


Laracon 2021

Diving the Queue

The final Laravel Service Container talk

Routing Laravel

Laravel Update

Understanding Laravel broadcasting

Understanding Foundation: What ties everything together

Doing small things with Livewire & Alphine

Laravel's Artisan Console component