I have an API. It's built with a RESTful extension over Active Record, and some endpoints provide PUT methods to upload files. By a REST design we create an entity with POST /video
first, and then upload a video file with PUT /video/{id}/data
.
I have an API. It's built with a RESTful extension over Active Record, and some endpoints provide PUT methods to upload files. By a REST design we create an entity with POST /video
first, and then upload a video file with PUT /video/{id}/data
.
It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's very important to know how the Eager Loading approach works in Yii 2. It has changed drastically from that of Yii 1.1, and there are common misunderstandings about it in the community.
Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.
The CRUD generator of Gii has done a wonderful job for you, and you already have a list of items in the "index" page and a detailed view of a specified item in the "view" page.
An example of customizing the Yii GridView is mentioned here. You can easily override Bootstrap or other styling defaults by changing the GridView default options.
The definition of breadcrumbs according to its documentation is as follow: Breadcrumbs displays a list of links indicating the position of the current page in the whole site hierarchy.
When to use Active Record is a common question among developers, Yii and overall.
I was playing around with another PHP framework which I didn't really liked anyway but it had simple and nice integration for PHP built in web server so I decided to write one for Yii (since this is my primary PHP framework)
To use jui auto complete widget first add
When building PHP web applications you usually have to take care about defining and providing a consistent development and production environment for your team. This includes your application packages, PHP-extensions, database servers and often further components such as a mail server or workers.
There are a few settings and plugins that can enhance the development experience with Yii in PHPStorm or IntelliJ IDEA. This article explains how to get the most out of your IDE.
https://schema.org is a markup system that allows to embed structured data on their web pages for use by search engines and other applications. Let's see how to add Schema.org to our pages on Yii2 based websites using JSON-LD.
composer update
does not fetch any new packages (even though the source is updated)composer update
.composer update
earlier, but it was partially done, before you lost network connectivity, and you cannot refresh packages anymore.Your need: You require that for shared machines, the user is authenticated again for a backend access again, if someone is logged in from frontend and vice versa.
This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).
In yii2 we can create form without create FormModel. Here we go
Normally, after clicking the delete button in gridview, the record will be deleted and the page will refresh, but the page number in query string is lost. This is not always the case we expect.
This is an extension to Yii 2.0: Write & use a custom Component in Yii2.0 for Advanced Template
Hello,
If you want to give extra attention for some specific delete actions and you don't want to override whole yii.confirm JS method here is what you can do:
(I've only put the ActionColumn part of the GridView here to just give you the idea)
If you started playing with Yii2's new GridView, you will soon realize that some things have improved quite a lot, but I am sure its going to be a bit confusing at first glance when you try to modify certain javascript behaviors like for example, its delete confirmation dialog box.