Press enter to see results or esc to cancel.

Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, June 10 2021

How to Remove a Migration in Laravel

I wanted to delete a laravel migration because I named it incorrectly so I had to follow the steps to rollback.

I found this article on StackOverflow that showed me what to do to delete a migration I accidentally created a migration with a bad name (command: php artisan migrate:make). I did not run (php artisan migrate) the migration, so I

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Tuesday, June 8 2021

Get the Last Inserted ID Laravel

Get Laravel Insert Statement ID Row. Simple 4 Methods to follow.

These are short code snippets on how to get your last inserted ID on Laravel.  1) Using the insertGetId() method $id = DB::table('users')->insertGetId( [ 'name' => 'first' ] ); dd($id); 2) Using the lastInsertId()

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Monday, June 7 2021

Laravel Admin LTE Custom Master Blade PHP File

Laravel AdminLTE Custom Master Blade inside Views

In order to create a master blade outside of the vendor folder, you would create a new folder inside the views follow these steps Duplicate files into views/vendor/adminlte/master.blade.php That is all you need to get your master blade outside of

Continue reading
Abraham Garcia Abraham Garcia in Javascript/jQuery   Saturday, June 5 2021

Isotope Elements Overlap How to Solve

How to Stop Overlapping Elements with isotope JS

I was struggling to get isotope elements to stop overlapping and I found something that showed me a couple of ways to fix it. The way I fixed it was by waiting for the whole script to load and then running isotope. The problem is that when it is

Continue reading
Abraham Garcia Abraham Garcia in Javascript/jQuery   Friday, June 4 2021

How to Replace Default WordPress jQuery

Change the Default WordPress jQuery with an Older Version

Today I was having issues with an older WordPress template that required an older version of jQuery, but when I updated to the newer version it broke the theme. So I found this snippet that you paste on your template functions to replace the jQuery

Continue reading
Abraham Garcia Abraham Garcia in WordPress   Thursday, May 20 2021

Query Post By Custom Fields WordPress Advanced Custom Post

Query By a Custom Field Advanced Custom Fields Plugin

I was looking into searching custom fields on WordPress and I found a simple method for this. $posts = get_posts(array( 'numberposts' => -1, 'post_type' => 'post', 'meta_key' => 'color', 'meta_value' => 'red' )); Here is also

Continue reading
Abraham Garcia Abraham Garcia in Javascript/jQuery   Monday, May 10 2021

How to Update Ionic Files Overwriting Configuration Files

Sync your Ionic iOS Files with Capacitor

Use this simple command to Sync Ionic File Updates to iOS npx ionic capacitor sync ios  

Continue reading
Abraham Garcia Abraham Garcia in Fun Stuff   Thursday, May 6 2021

Mac OS: xcrun: error: invalid active developer path, missing xcrun

I Got a Git Error Tyring to Run Git Commands after a Recent MacOS Update

I just updated my MacOS and when I did a git add or git commit i got a error saying the following xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Continue reading
Jesus Macias Jesus Macias in Javascript/jQuery   Friday, April 30 2021

Ref in React

Dealing with Ref in React JS

The references on React are utilized to access the instance in a DOM node and able to interact just like you would do it in JavaScript or components created with react.  import React, { createRef } from 'react'; const MyComponent=() => {

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, April 22 2021

How To Do a Get Request on Laravel

Use the HTTP Helper in Laravel to Perform GET requests. This example also includes a Bearer Token Request.

In order to do a GET request on Laravel you can use the HTTP Request Helper.  Include this in your header to use the helper.  use IlluminateHttpRequest; Then you can request your get URL here we also have a  bearer token we are

Continue reading