This file contains hidden or 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 config_struct::{Error, StructOptions}; | |
use std::fs; | |
const CONFIG_FILE_DST: &str = "src/config.rs"; | |
fn main() -> Result<(), Error> { | |
println!("cargo:rerun-if-changed=build.rs"); | |
println!("cargo:rerun-if-changed=config.toml"); | |
let mut config_file_src = "config.toml"; |
This file contains hidden or 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 | |
$userHost = '%'; | |
foreach(config('database.connections') as $name => $connection) { | |
if ($connection['driver'] != 'mysql') { | |
continue; | |
} | |
try { | |
\DB::connection($name)->getPdo(); | |
} catch(\Doctrine\DBAL\Driver\PDOException $exception) { |
This file contains hidden or 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\PHPPM; | |
use Illuminate\Container\BoundMethod; | |
use Illuminate\Support\ServiceProvider; | |
use PHPPM\Bootstraps\Laravel; | |
class LumenAdapter extends Laravel | |
{ |
This file contains hidden or 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
@if ($crud->hasAccess('create')) | |
@php($parameters = []) | |
@php($attributes = collect($entry->getAttributes())) | |
@foreach($crud->getFields('create') as $field) | |
@if($attributes->has($field['name'])) | |
@php($parameters[$field['name']] = $attributes->get($field['name'])) | |
@endif | |
@endforeach |
This file contains hidden or 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 | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class MigrateToUtf8mb4 extends Migration | |
{ | |
/** | |
* Run the migrations. |
This file contains hidden or 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 WoltlabSuiteValetDriver extends BasicValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
This file contains hidden or 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 /** app/Http/Controllers/CrudController.php **/ | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Response; | |
class CrudController extends \Backpack\CRUD\app\Http\Controllers\CrudController | |
{ | |
public function setUp() | |
{ |
This file contains hidden or 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
#!/usr/bin/env php | |
<?php | |
/* | |
Copyright 2013 Stuart Carnie and other contributors | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |