ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Part 5: Generate Models - Laravel 5.4 New Features

laravel

php

artisan

code

tutorial

new

Автор: DevMarketer

Загружено: 2017-02-15

Просмотров: 11398

Описание: In Laravel 5.4 we can use new artisan helpers to generate a matching model with our controllers. In fact if we already have a model, we can tell our controller to link to that model.

To get this functionality we need to do a simple command with the --model flag at the end.

php artisan make:controller ControllerName --model=ModelName

By adding that flag it will tie the controller to a model. If the model doesn't exist then it will ask us if it wants to create a new one for us. The default here is to create the new model. If you do not want this for some reason, you can reply to the prompt with "no". This will create an empty model and a boilerplate resourceful controller.

It is important to note here that controllers are resourceful by default. They will automatically pull in requests on applicable methods in the controller and they will also typehint your model objects whenever applicable as well. The importing of your model into the controller is also automatic. This gives us a lot of bonus functionality for "free" with no effort.

If you tie a controller to a model that already exists, you will get all the same functionality as before, but Laravel will recognize the model already exists and not prompt you to make a new one. All linking and "bonus" functionality occurs as normal and the resourceful controller is made.

---

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Part 5: Generate Models - Laravel 5.4 New Features

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Part 6: Components & Slots - Laravel 5.4 New Features

Part 6: Components & Slots - Laravel 5.4 New Features

Part 8 - Model Basics [How to Build a Blog with Laravel 5 Series]

Part 8 - Model Basics [How to Build a Blog with Laravel 5 Series]

Part 10 - CRUD and RESTful Routes [How to Build a Blog with Laravel 5 Series]

Part 10 - CRUD and RESTful Routes [How to Build a Blog with Laravel 5 Series]

«Будем жить!» | Хитрая передача на Первом канале о вернувшихся с СВО (English subtitles) @Max_Katz

«Будем жить!» | Хитрая передача на Первом канале о вернувшихся с СВО (English subtitles) @Max_Katz

ПОТАПЕНКО:

ПОТАПЕНКО: "Я скажу страшную вещь". Про экономику, Силуанова, пакет с пакетами и ЧТО ДАЛЬШЕ

КАК ЖИВЁТ РУБЛЕВКА В 2025 ГОДУ?

КАК ЖИВЁТ РУБЛЕВКА В 2025 ГОДУ?

Похудей на 45 КГ, Выиграй $250,000!

Похудей на 45 КГ, Выиграй $250,000!

Силовой захват власти / Новая спецоперация РФ?

Силовой захват власти / Новая спецоперация РФ?

Знакомство с WebSocket - от концепции до старта #программирование

Знакомство с WebSocket - от концепции до старта #программирование

Part 8: Markdown Email Mailables - Laravel 5.4 New Features

Part 8: Markdown Email Mailables - Laravel 5.4 New Features

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]