I’m using laravel 5.1, I’m trying to update locale in app file like this : In Locale Middleware file : … public function handle($request, Closure $next) { if(Session::has(‘locale’…
Laravel lockforupdate (Pessimistic Locking)
i’m trying to figure out how to use/test the lockforupdate correctly, but i found is not function like what i expected this is just testing public function index() { return dd(DB::…
Php artisan make:auth command is not defined
I’m trying to run this command in Laravel 5.2 but it’s not working: php artisan make:auth And prompts with these statements: [InvalidArgumentException] Command “make:auth” is not defined …
PHP wrong foreach code
What I have done wrong, foreach code written below, but it seems not working: What I have to change in this foreach code? Thanks Answer first line, custom is not a variable (could be copy and paste error) Then you are splitting a string using can array operator, you need to split that string first using: Then…
updating multiple records in php from multiple textbox (textbox name depends on number of records)
I have a table that holds records of grades of student, these students are in a group. some have 5 members some have 4, 3 or 2. The page where grades can be edited returns all the names of the group selected with a textbox corresponding to each of them. this is the part of my code that returns the
WordPress Woocommerce Redirect Argument
When I enable my site automatically show argument ?v= like this How can I fix this? Answer String to all urls ?v=XXXXXXXXXXXX. That URL is coming from standard base address setting in Woocommerce. When you choose geolocation with caching support for page, it will add that ?v=xxxx string because it’s cap…
Change Faker Locale in Laravel 5.2
Is there a way to specify the Faker locale in the database/factories/ModelFactory.php file ? Here is my non functioning attempt at doing so >,< Thanks for reading! Answer Faker locale can be configured in the config/app.php configuration file. Just add the key faker_locale. e.g.: ‘faker_localeR…
php preg_replace all but alphanumeric, space and accented letters
I want to strip a string from all characters, except for: Alphanumeric characters, spaces and accented letters. I got it to work for everything except for the accented letters: $fname = preg_replace(…
Laravel 5 Session working in Postman not working if called from browser
After login I use session to set the user details. If i use postman i can get the session details. If i try logging from my browser its showing null Here is my controller namespace AppHttp…
filesize(): stat failed for specific path – php
i am coding a simple doc managing script and need to get the file size and file type /file or folder/ in a table. somehow it doesn’t work into the mention directory. please help if possible: it does actually has 2 errors – one the file size doesn’t work for the location, if i change it to pa…