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
class Payment extends Eloquent | |
{ | |
const PAID = 1; | |
const PENDIND = 2; | |
public function entry() | |
{ | |
return $this->belongsTo('Entry', 'entry_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
<?php | |
class Entry extends Eloquent | |
{ | |
protected function withPaymentsStatus($status) | |
{ | |
return $this->whereHas('payments', function($query) { | |
$query->where('status', $status); | |
}); | |
} |
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 | |
class Math { | |
/** | |
* The base. | |
* | |
* @var string | |
*/ | |
private static $base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
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
(function($, undefined) { | |
/** | |
* Unobtrusive scripting adapter for jQuery | |
* https://github.com/rails/jquery-ujs | |
* | |
* Requires jQuery 1.8.0 or later. | |
* | |
* Released under the MIT license | |
* |
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 | |
// Creating your own class | |
namespace Your\Namespace; | |
use Corcel\Post as Corcel; | |
class Post extends Corcel | |
{ |
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 // File wherer you include the form to make a search ?> | |
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> |
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 { // default namespace | |
function foo() | |
{ | |
return 'foo function'; | |
} | |
} |
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
Verifying that +jgrossi is my blockchain ID. https://onename.com/jgrossi |
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 // File location: /wp-content/themes/my-theme/src/Models/ | |
namespace App\Models; | |
use Illuminate\Database\Eloquent\Model as Eloquent; | |
class Car extends Eloquent | |
{ | |
protected $table = 'cars'; | |
protected $primaryId = '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
<?php // File: /config/database.php | |
'connections' => [ | |
'mysql' => [ | |
'driver' => 'mysql', | |
'host' => 'localhost', | |
'database' => 'app', | |
'username' => 'admin' | |
'password' => 'secret', |
OlderNewer