Skip to content

hexlet-components/php-laravel-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-laravel-blog

github action status codecov

Demo: https://php-laravel-blog.hexlet.app/

Requirements

  • PHP ^7.4 || ^8.1
  • Extensions: mbstring, curl, dom, xml,zip, sqlite3
  • Composer
  • Node.js & npm
  • SQLite for local
  • heroku cli

Setup

For Docker setup update .env.example

DB_CONNECTION=pgsql
DB_HOST=db
DB_DATABASE=postgres
DB_USERNAME=postgres
DB_PASSWORD=password
make setup

Run

make start

From Scratch

composer create-project --prefer-dist laravel/laravel hexlet-laravel-blog
cd hexlet-laravel-blog
make start # Open http://localhost:8000

touch database/database.sqlite
# update .env.example (DB_CONNECTION DB_DATABASE)

php artisan make:model Article --migration
# update migration (add name and body)
php artisan migrate
add .psysh # https://stackoverflow.com/questions/53773098/php-artisan-tinker-crashing-from-any-command
# for reloading https://github.com/furey/tinx
php artisan tinker

php artisan make:controller ArticleController --resource
# add Route::resource('articles', 'ArticleController');
php artisan route:list

Hexlet Ltd. logo

This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.


See most active contributors on hexlet-friends.