I have a dropdown menu like this:
Tag: laravel
Drop Unique Index Laravel
I kept getting this while run php artisan migrate SQLSTATE[42000]: Syntax error or access violation: 1091 Can’t DROP ’email’; check that column/key exists While I see that email is exist on my database. My migration script. I was trying to drop the unique constraint. Did I forget to clear any caches ? Any hints for me ? Answer When dropping
Laravel Distinct Count
Any way to make this query work using laravel? DB::raw or Eloquent usage doesn’t matter. SELECT count(DISTINCT name) FROM tablename; Here’s what i’ve tried but cannot get the proper output: …
Laravel custom helper – undefined index SERVER_NAME
In Laravel 5.1, I created a custom helper file: custom.php which I load in composer.json: and it contains this method: It works as expected, but every time I do php artisan commands, I get a call stack and this message: Why is this so? The method returns the correct value when run from within my Laravel app. Answer $_SERVER[‘SERVER_Name’] global
migrating a specific table in laravel
using command php artisan migrate migrates all the tables. but i have employees table that i migrated along with other tables. but it is not migrated (i cannot see it in phpmyadmin). now when i again use php artisan migrate command it displays nothing to migrate. How can i migrate that specific employees table? Answer For Specific File run this
Manually register a user in Laravel
Is it possible to manually register a user (with artisan?) rather than via the auth registration page? I only need a handful of user accounts and wondered if there’s a way to create these without having to set up the registration controllers and views. Answer I think you want to do this once-off, so there is no need for something
Custom defined routes not resolving in Laravel
I have a Laravel 5.2 instance utilizing all the typical out-of-the-box routes for dashboard, cases, home, login/logout, and users (which is working well). I now need to create a wizard with steps (step1, step2, step3, etc.), and I need access to the session. I assigned them to the group middleware. However, when I go to the named route(s), I get
Laravel – 404 Not found every page except homepage
I’m newbie on Laravel. I’m using Laravel 5 – Wamp on Windows 8. Every page on my localhost have 404 not found error except homepage. Although I can access them with index.php . For example URL is : http://localhost/mpr/public/index.php/register is okay. Actually http://localhost/mpr/public/register has an error (404 not found). I’ve checked rewrite_module but it was not changed. Any suggestion? Answer
Run one file or map in phpunit
I’m using laravel and I’ve written some test files. But how can I exec only one file? When I do for example: phpunit tests/resulttesting/school/deleteSchoolForRealTest It throws an error: Cannot …
find in set in laravel ? example
I am new in laravel. My query is i need to find out value from comma separated field. Here is my table: tags_value ╔════╦══════════════╗ ║ id ║ tags ║ ╠════╬══════════════╣ ║ 1 ║ css,html,…