Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// Do everything in a closure, so we don't affect or create any globals. | |
(function( $, window, document, undefined ) { | |
"use strict"; | |
var Project = Project || {}; | |
Project.init = function () { | |
/front-end(publicly visible area) | |
/admin area(management area) | |
non-cms, client request url from web server, web server sees if requested file exists, and if it does, it returns it. Very simple. Url is tied closely to the web page | |
THE FRONT-END AREA | |
cms(database backend cms, non-database backend cms). url does not exactly correspond directly to files on a server. Instead of creating webpages as files, it is better to use a "controller" to read from a database, based on what the URL was. There is a popular programming pattern called MVC, which is very similar in principle to what a CMS of this type does. | |
THE ADMIN AREA |
#!/bin/bash | |
# This script creates a new project (or site) under /var/sites and creates | |
# new virtual host for that site. With the options a site can also | |
# install the latest version of Laravel directly. | |
# This script was originally based on the following script by @Nek from | |
# Coderwall: https://coderwall.com/p/cqoplg | |
# Display the usage information of the command. | |
create-project-usage() { |
#!/bin/bash | |
# `` sudo sh install.sh `` | |
# Stable environnement | |
# Important: use 'i686' instead of 'x86_64' | |
# For Development environnement see also : https://gist.github.com/mickaelandrieu/6312683 | |
echo Installation de Phantomjs | |
cd /usr/local/share | |
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.8.2-linux-x86_64.tar.bz2 |
// Evento - v1.0.0 | |
// by Erik Royall <[email protected]> (http://erikroyall.github.io) | |
// Dual licensed under MIT and GPL | |
// Array.prototype.indexOf shim | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf | |
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { | |
'use strict'; |
// (…) | |
var childProcess; | |
try { | |
childProcess = require("child_process"); | |
} catch (e) { | |
this.log(e, "error"); | |
} | |
if (childProcess) { | |
childProcess.execFile("/bin/bash", ["mycommand.sh", args1, args2, args3], null, function (err, stdout, stderr) { | |
this.log("execFileSTDOUT:", JSON.stringify(stdout), 'debug'); |
The simplest way to traverse the hierarchy tree with Baum is by iterating through the children
relation.
<?php
$root = Category::roots()->with('children')->first();
echo "<h3>{$root->name}</h3>";
foreach($root->children as $category) {