Code | Meaning |
---|---|
200 | All good! |
201 | Resource created |
302 | You were redirected |
400 | The request was unacceptable (you screwed up) |
403 | You are not authorized to access the resource |
401 | You are not authorized |
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
<VirtualHost *:443> | |
ServerAdmin ***** | |
ServerName beta.****.us | |
DocumentRoot /var/www/beta/public | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> | |
<Directory /var/www/> | |
Options Indexes FollowSymLinks MultiViews |
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
server { | |
listen 80; | |
server_name www.example.com; | |
root /home/forge/example.com/public; | |
# FORGE SSL (DO NOT REMOVE!) | |
# ssl on; | |
# ssl_certificate; | |
# ssl_certificate_key; |
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
if [ ! -f /usr/local/extra_homestead_software_installed ]; then | |
echo 'installing some extra software' | |
# | |
# install zsh | |
# | |
apt-get install zsh -y | |
# | |
# install oh my zhs |
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 test() | |
{ | |
$mock = Mockery::mock('Illuminate\Contracts\Auth\Guard'); | |
app()->instance('Illuminate\Contracts\Auth\Guard', $mock); | |
$this->call('POST', 'auth\login', ['email' => '[email protected]', 'password' => 'asasdsdfb']); | |
$mock->shouldReceive('attempt')->once()->andReturn('false'); | |
} |
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 App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use App\Company; | |
use App\Repositories\Company\EloquentCompany; | |
class CompanyServiceProvider extends ServiceProvider { | |
/** |
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
@foreach( $company->user_tags as $index => $tag) | |
@if($index == 0)<p><!-- First Time Through -->@endif | |
<span class="label label-primary">{{ $tag }}</span> | |
@if($index == count($company->user_tags) - 1) </p> <!-- Last Time Through -->@endif | |
@endforeach |
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 postExistingCompanyToNetwork(AddExistingCompanyToUsersNetwork $request) | |
{ | |
if ( ! $company = $this->company->postToUsersNetworkByUuid($request, $this->user) ) | |
{ | |
return Redirect::back(); | |
} | |
return Redirect::route('network'); | |
} |
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 modifyEntryTableAttributes(&$attributes, $source) | |
{ | |
if ($source == 'zcstalecontent:stale_content') | |
{ | |
unset($attributes['expiryDate']); | |
// zcContentData is my custom field. It has a Date/Time field and a text field | |
// that is grouped into it's own 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
1. Create a model and populate its data (may or may not have an ID yet) | |
2. Populate the record from the model. | |
3. Validate the record and add any errors found to the model. | |
4. If the model and record are valid, save the model with the `craft()->elements->saveElement($model)` which, if successful, will place an ID on the model if there was none. | |
5. If the model saved successfully with the element service, add the model's ID to the record and save the record. | |
6. This results in the same ID being shared in the main `craft_elements` table , and your own records table. |
OlderNewer