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 | |
$array = ['string1', 'string2', 'string3']; | |
$obj = new ArrayObject( $array ); | |
$it = $obj->getIterator(); | |
$new = []; | |
while($it->valid()) |
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 | |
echo '<table border="1"><tr>'; | |
foreach(range(1,20) as $key => $row) | |
{ echo '<td>'. $row . '</td>'; | |
if(++$key % 5 == 0 ) echo '</tr><tr>'; | |
} | |
echo '</td></table>'; |
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 LaravelCms\Mvc\Resolver; | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. |
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 LaravelCms\Theme; | |
class Theme | |
{ | |
/** | |
* Theme constructor | |
* | |
* @return void | |
* @access public |
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 Lithe\Database; | |
use Illuminate\Database\Eloquent\Model; | |
use Lithe\Contracts\Database\RepositoryInterface; | |
use Illuminate\Contracts\Container\Container; | |
abstract class Repository implements RepositoryInterface | |
{ |
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 Controller { | |
public function action() | |
{ | |
$model = MyModal::with('relationship')->first(); | |
return $model->relationshipPaginated(); | |
} |
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 Modules\System\Http\Controllers\Frontend; | |
use Modules\System\Http\Requests\Frontend\LoginRequest; | |
use Modules\System\Http\Requests\Frontend\RegisterRequest; | |
use Modules\System\Http\Requests\Frontend\ResetRequest; | |
use Modules\System\Domain\User\UserManager; | |
use Modules\System\Domain\User\UserRepositoryInterface; | |
use Modules\System\Domain\User\LoginManager; | |
use Modules\System\Domain\Validating\ValidatingManager; |
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\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class InstallProjectsModule 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 | |
if(!validate_request()) { | |
die('you requested data from a $_GET key that is not whitelisted.'); | |
} | |
echo 'Your request is valid'; | |
function validate_request($additional_keys = array()) { |
OlderNewer