-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·85 lines (64 loc) · 1.82 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Variables
PROJECT_NAME ?= $(shell bash -c 'read -p "Name of your project: " project; echo $$project')
# Functions
init: build up composer key
.PHONY: init
build:
@docker-compose build
.PHONY: build
up:
@docker-compose up -d
.PHONY: up
down:
@docker-compose down --remove-orphans
.PHONY: clean
start:
@docker-compose start
.PHONY: start
stop:
@docker-compose stop
.PHONY: stop
composer:
@docker-compose exec app composer install
.PHONY: composer
key:
@docker-compose exec app php artisan key:generate
.PHONY:key
migrate:
@docker-compose exec app php artisan migrate
.PHONY:migrate
migrate-fresh:
@docker-compose exec app php artisan migrate:fresh
.PHONY:migrate-fresh
seed:
@docker-compose exec app php artisan db:seed
.PHONY:seed
debugbar:
@docker-compose exec app composer require barryvdh/laravel-debugbar --dev
.PHONY:debugbar
restart: clean up composer key migrate seed
.PHONY: restart
laravel-init:
@docker-compose exec app composer create-project laravel/laravel $(PROJECT_NAME)
.PHONY: laravel-init
create-model:
@docker-compose exec app php artisan make:model $(MODEL_NAME)
.PHONY: create-model
create-model-with-migration:
@docker-compose exec app php artisan make:model $(MODEL_NAME) -m
.PHONY: create-model
create-complete-model:
@docker-compose exec app php artisan make:model $(MODEL_NAME) --controller --resource --requests --migration --factory --seed
.PHONY: create-model
create-migration:
@docker-compose exec app php artisan make:migration $(MIGRATION_NAME)
.PHONY: create-migration
create-event:
@docker-compose exec app php artisan make:event $(EVENT_NAME)
.PHONY: create-event
create-controller:
@docker-compose exec app php artisan make:controller $(CONTROLLER_NAME)
.PHONY: create-controller
create-request:
@docker-compose exec app php artisan make:request $(REQUEST_NAME)
.PHONY: create-request