This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// holder is the ID of the invisible Div that holds the option field. | |
// Function to find the option_test text field and populate it with data that is echoed in the option_holder div | |
jQuery(document).ready(function () { | |
var option_populate_FIELD_NAME = document.getElementById('acf-field_58b2d845dda65'); | |
var option_holder_FIELD_NAME = jQuery('#option_holder_FIELD_NAME'); | |
var option_test_FIELD_NAME = option_holder_FIELD_NAME["0"].innerText; | |
// Checks that the field is empty before populating |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Loads the venues into the Formidable Venue Select Field on page load | |
jQuery('document').ready(function(){ | |
for(var i = 0; i < venueHolder.children.length; i++) { | |
// Adds the child divs of '.venue-holder' to an array | |
var arr = venueHolder.children; | |
// Selects the current individual item of this array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function up() | |
{ | |
Schema::create('groceries', function (Blueprint $table) { | |
$table->increments('id'); | |
$table->string('name'); | |
$table->string('type'); | |
$table->integer('price'); | |
$table->timestamps(); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Flight; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller; | |
class FlightController extends Controller | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$flight = App\Flight::find(1); | |
$flight->name = 'New Flight Name'; | |
$flight->save(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$flight = App\Flight::find(1); | |
$flight->delete(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function up() | |
{ | |
Schema::create('groceries', function (Blueprint $table) { | |
$table->increments('id'); | |
$table->string('name'); | |
$table->string('type'); | |
$table->integer('price'); | |
$table->timestamps(); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://code.jquery.com/jquery-3.3.1.min.js" | |
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" | |
crossorigin="anonymous"> | |
</script> | |
<script> | |
jQuery(document).ready(function(){ | |
jQuery('#ajaxSubmit').click(function(e){ | |
e.preventDefault(); | |
$.ajaxSetup({ | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use App\Grocery; | |
public function store(Request $request) | |
{ | |
$grocery = new Grocery(); | |
$grocery->name = $request->name; | |
$grocery->type = $request->type; | |
$grocery->price = $request->price; | |
$grocery->save(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class ShareController extends Controller | |
{ | |
/** | |
* Display a listing of the resource. |
OlderNewer