Skip to content

Tag: php

laravel seed rollback after seeding database

I have seeded my DB using php artisan db::seed. Is there a way to rollback what I have seeded into my DB? I cannot seem to find any command like php artisan db::seed rollback. Answer use Undo Seeder for Laravel. When you install UndoSeeder, the following artisan commands are made available: more Undo-Seeder

.htaccess is renaming my css, img, and js

I am trying to route a single blog post from a url The url looks like this : http://localhost/news/post/1/post-title-slug And my .htaccess: And my routing file I am currently using a library called nezamy/route When I do this my css, js and images is renamed as well to something like this: http://localhost/ne…

Should I install xampp or wamp?

So I have IIS manager already installed in my computer, and I want to update to php7 then install laravel, but the video tutorials, articles and documentations online is mostly geared towards people who use xampp and wamp I couldn’t find a tutorial for IIS. I really want to download and install xampp or…

reCaptcha: error code “invalid-keys”

I currently implementing the reCaptcha for an form with HTML and PHP. The client-side solution works without any problems. But the server side fails with the validation. So here is my server side code: So now when I dump the result I get the following output: I’m sure that the response code will complet…

Laravel and Nginx static files

So I am having a problem with getting Nginx to serve static files for my Laravel app. I can see in chrome’s dev tools that the requests are being made to the path, where those files should be (http://…

Where to put custom SQL code in CakePHP 3?

I’m building an application in CakePHP 3. It uses a number of legacy databases which are not built in the Cake conventions. I do not want to use any of the ORM features Cake provides, as it’s more tedious to set up all the relations than just write “Raw SQL”. We are also not going to m…