Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
| <config> | |
| <modules> | |
| <Sample_Socialmedia> | |
| <version>0.0.1</version> | |
| </Sample_Socialmedia> | |
| </modules> | |
| <frontend> | |
| <routers> | |
| <socailpromo> | |
| <use>standard</use> |
| gayan@gayan-laptop:~/Workspace/personal$ git clone -b develop https://github.com/laravel/laravel.git | |
| Cloning into 'laravel'... | |
| remote: Reusing existing pack: 21846, done. | |
| remote: Total 21846 (delta 0), reused 0 (delta 0) | |
| Receiving objects: 100% (21846/21846), 8.50 MiB | 116.00 KiB/s, done. | |
| Resolving deltas: 100% (10882/10882), done. | |
| Checking connectivity... done. | |
| gayan@gayan-laptop:~/Workspace/personal$ clear | |
| gayan@gayan-laptop:~/Workspace/personal$ ls | |
| git-test laravel last-min.-shopping magelk-charity taskrapp |
| So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
| Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
| * Off the top of my head * | |
| 1. Fork their repo on Github | |
| 2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
| git remote add my-fork git@github...my-fork.git |
| <?php | |
| class TestCase extends Illuminate\Foundation\Testing\TestCase { | |
| /** | |
| * Creates the application. | |
| * | |
| * @return Symfony\Component\HttpKernel\HttpKernelInterface | |
| */ | |
| public function createApplication() |
| <?php | |
| $status = 'Image successfully uploaded!'; | |
| ?> |
| <?php | |
| /** | |
| * This snippet implements the logic behing https://github.com/philipbrown/signplz , simply to explain the functionality of generating the auth signature | |
| * for non-php programmers so that they can authenticate with the API without a problem. | |
| **/ | |
| $api_key = "key"; | |
| $api_sec = "sec"; | |
| $url = "http://abc.com/api/test"; |
| <?php | |
| // Ref : http://php.net/manual/en/function.ftp-put.php | |
| $name = "test.txt"; | |
| $filename = "/home/mine/Desktop/test.txt"; | |
| //-- Code to Transfer File on Server Dt: 06-03-2008 by Aditya Bhatt --// | |
| //-- Connection Settings | |
| $ftp_server = "server_url_here"; // Address of FTP server. | |
| $ftp_user_name = "username_here"; // Username |
| [Unit] | |
| Description=Restart WiFi on Resume | |
| After=suspend.target | |
| [Service] | |
| Type=oneshot | |
| RemainAfterExit=no | |
| ExecStart=/usr/bin/modprobe -r rtl8821ae | |
| ExecStart=/usr/bin/modprobe rtl8821ae | |
| ExecStart=/usr/bin/ifconfig wlp3s0 down |