Questions tagged [yii2-basic-app]

Yii 2 Basic Project Template is a skeleton Yii 2 application best for rapidly creating small projects.

Yii 2 Basic Project Template is a skeleton Yii 2 application best for rapidly creating small projects.

The template contains the basic features including user login/logout and a contact page. It includes all commonly used configurations that would allow you to focus on adding new features to your application.

GitHub

Official Site

800 questions
3
votes
1 answer

Yii2 - Upgrade from basic application to Advanced application

I have developed a Basic application in Yii2. It contains 3 models and respective controllers and views, no extension, no theme. I now think that I should make that application with advanced template for future extend-ability. Can I convert the…
hs19
  • 187
  • 2
  • 13
3
votes
1 answer

How to login with Yii2 through twitter account

I am following the yii2-user guide, and I succeed to login through a facebook account. Now i want to login through a twitter account and my 'consumerKey' => 'h5XFtvRVSxxxxxxxxxxxxx', 'consumerSecret' =>…
raxa
  • 471
  • 7
  • 19
3
votes
1 answer

Separate users in Yii2's basic template

I am working with Yii2 and just can't separate users. My app has two modules. This is my config from web.php: 'frontendUser' => [ 'class' => 'yii\web\User', 'identityClass' => 'app\models\User', 'enableAutoLogin' => false, …
Andris
  • 175
  • 1
  • 1
  • 7
3
votes
2 answers

Unable to verify your data submission bad request (#400) in yii2 (if select video format)

i am new yii2, so i have this problem. i want to use fileinput so i add fileinput this url http://www.yiiframework.com/doc-2.0/guide-input-file-upload.html if i create new model with file input (select video) and if i delete item in model …
2
votes
0 answers

Yii 2 Cinema seat style Form

I have a project where the user can buy ticket for a movie in a cinema and there's an opportunity for booking seats. My problem is the seat booking because I have to make a special form like this: And the user select seats in this mosaic and after…
Awe Fiend
  • 17
  • 2
2
votes
1 answer

How to fetch already existing records in MySql with start_time and end_time in yii2?

I am having tbl_batch which has id title start_date start_time end_time venue_id created_by In the database start_time and end_time is being saved as time() Row:- id 1 title test start_time 10:10 end_time 11:30 venue_id 1 start_date 2020-03-01…
2
votes
1 answer

Yii2 Invalid Configuration: ApcCache requires PHP apc extension to be loaded

I receive the exception when configure the cache components in main configuration of basic-template, how I can fix this problem? app/config/web.php: my php version is 7.1.11 'cache' => [ 'class' => 'yii\caching\ApcCache', 'keyPrefix'…
yasir shah
  • 73
  • 1
  • 9
2
votes
1 answer

Fatal error: Uncaught Error: Class 'yii\widgets\ActiveForm' not found

When working with Yii 2.0 I keep up facing this problem: Fatal error: Uncaught Error: Class 'yii\widgets\ActiveForm' not found" I have checked the the widgets and ActiveForm is present. I tried also with yii\bootstrap\ActiveForm but the same error…
2
votes
2 answers

How to get previous and next row model ID in yii2 gridview data row

While in GridView widget and displaying ActiveDataprovider results that i fetched from a customized query, i want to get next and previous row $model->id while displaying the records, what i need to do is to show links to previous and next posts…
SAQIBZAFAR
  • 89
  • 2
  • 10
2
votes
1 answer

Creating tests for modules yii2

Hi i am new with yii2 testing, i have setup testing environment and tests in app/tests and its working fine. Now i want to setup tests for one of my modules which is modules/v1 and contains commands,components,controllers and models folders. I have…
Asad Zaheer
  • 81
  • 2
  • 9
2
votes
1 answer

Upgrade version from Yii 2.0.12 to Yii 2.0.14 or higher

Currently, My project using version of Yii 2.0.12. But I want to use extension yiisoft/yii-queue. When I run command composer require yiisoft/yii-queue to install this extension, this throw message require to update Yii version to 2.0.14 to use…
2
votes
1 answer

Yii2 Pagination + LinkPager Not Showing

should be a simple fix but I'm not exactly sure why my LinkPager isn't showing here. My controller action is: public function actionIndex() { $query = Shout::find()->orderBy(['id' => SORT_DESC]); $countQuery = count($query); $pagination…
D. Milk
  • 75
  • 8
2
votes
2 answers

Yii2 search model

On my website, when I search Alex Lau, I will show the result Alex Lau. The problem is how can I modify the code so when I search Lau Alex maybe, It will still show Alex Lau result. Right now it didn't. $query->orFilterWhere(['like', 'fullname',…
Sao Ho
  • 139
  • 2
  • 22
2
votes
1 answer

Yii 2 can rewrite WHERE condition from model?

I have some where condition in my model . Its check is field active or no. Now I need to write a join relation. But I need to remove where condition. Is it possible? My model. ... public static function find() { return (new…
Lola_Padilya
  • 107
  • 1
  • 7
2
votes
3 answers

Yii2 Gridview error

I want to display column from another table in gridview. In my controller actionIndex: public function actionIndex() { $user_id = \Yii::$app->user->identity->id; $queryFile = PowerGen::find(); $queryFile…