0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravelのコマンド

Last updated at Posted at 2021-06-03

Laravelのアプリを作成

composer create-project laravel/laravel [アプリ名] --prefer-dist 6.*

composer create-project laravel/laravel laravel_bbs --prefer-dist 6.*

phpMyAdminの起動

  • php -S 0.0.0.0:8880 -t ~/environment/phpmyadmin

phpMyAdminへのログイン

  • ユーザー名: root

  • パスワード: secret

データベースの作成

データベースにログイン

  • mysql -u root -p

データベースの作成

  • CREATE DATABASE laravel_bbs_development;

作成したデータベースの確認

  • SHOW DATABASES;

SQL の入力画面から抜ける

  • exit;

Laravel の開発用サーバを起動

  • cd laravel_bbs

  • php artisan serve --port=$PORT

  • cd laravel_bbs && php artisan serve --port=$PORT

Laravelのコントローラーを作成

php artisan make:controller コントローラー名

php artisan make:controller SampleController

php artisan make:controller ShowProfile --invokable

モデル&マイグレーションを作成

php artisan make:model Message --migration

マイグレーションの実行

php artisan migrate

tinkerの起動

php artisan tinker

$message = new App\Message();
$message->name = 'Taro Yamada';
$message->body = 'This is a test.';

$message->save();

コマンド

ls
pwd
cd
mv
cp

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?