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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Test</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"> |
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 | |
$num_rec_per_page=10; | |
mysql_connect('localhost','root',''); | |
mysql_select_db('apex1'); | |
if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; }; | |
$start_from = ($page-1) * $num_rec_per_page; | |
$sql = "SELECT * FROM student LIMIT $start_from, $num_rec_per_page"; | |
$rs_result = mysql_query ($sql); //run the query | |
?> | |
<table> |
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
// *Check to see if someone has clicked on a word out of the description text on the video page.* | |
// *If they have then do a search for that term.* | |
if(isset($_GET["term"])) | |
{ | |
$termid = $_GET["term"]; | |
if(is_numeric($termid)) | |
{ | |
zpConnectDB('zanesitecontent'); | |
$sql = "SELECT g.id, g.term, t.name as topic, g.description FROM glossary AS g |
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
Too long error | |
Add [ Schema::defaultStringLength(191); ] in AppServiceProvider.php | |
Bootstrap links | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | |
Vuejs link | |
<script src="https://unpkg.com/vue"></script> |
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
Root URL [App URL] : http://phpstack-87385-243760.cloudwaysapps.com/index.php/rest/V1 | |
Step 1 : [Get token & authenticate] | |
URL [ POST ]: Root URL + /integration/admin/token | |
Credentials : | |
Username : sculpapiuser1 | |
Password : sculpapi1 | |
Step 2 : [Get categories with token id] |
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
$factory->define(App\Student::class, function (Faker\Generator $faker) { | |
return [ | |
'name' => $faker->name, | |
'marks' => $faker->numberBetween(0,100), | |
]; | |
}); | |
$factory->define(App\Teacher::class, function (Faker\Generator $faker) { | |
return [ | |
'name' => $faker->name, |
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 students() | |
{ | |
return $this->hasMany(Student::class, 'student_id'); | |
} |
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 run() | |
{ | |
factory(App\Teacher::class, 2)->create()->each(function ($teacher) { | |
$teacher->students()->saveMany(factory(App\Student::class, 25)->make()); | |
}); | |
} |
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 | |
$results = User::where('column_1', '=', 100) | |
->where('column_2', '>', 200) | |
->where('column_3', '<', 350) | |
->where('column_4', '=', 400) | |
->where('column_5', '>', 150) | |
->get(); |
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 | |
$conditions = [ | |
['column_1', '=', 100], | |
['column_2', '>', 200], | |
['column_3', '<', 350], | |
['column_4', '=', 400], | |
['column_5', '>', 150] | |
]; |
OlderNewer