Here's how I setup Laravel on MAMP:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
| <?php | |
| echo 'hayır hayır amca dedi'; | |
| ?> |
| <?php defined('SYSPATH') or die('No direct script access.'); | |
| /** | |
| * Sinan helper class. | |
| * | |
| * $Id: sinan.php 1.0 2012-02-22 20:06:38Z Geert $ | |
| * | |
| * @package Sinan | |
| * @author Sinan Eldem | |
| * @copyright (c) 2012 Sinan Eldem |
| <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| /* | |
| Grocery Crud Turkish Language File | |
| Translated by Sinan Eldem | |
| www.sinaneldem.com.tr | |
| */ | |
| $lang['list_add'] = 'Ekle'; | |
| $lang['list_actions'] = 'İşlemler'; | |
| $lang['list_page'] = 'Sayfa'; |
| <?php | |
| $dizi = array('koca' => array('isim' => 'sinan', 'yas' => 31), 'es' => array('isim' => 'bilge', 'yas' => 22)); | |
| echo 'Php: '; | |
| var_dump($dizi).'<br>'; | |
| $d = json_encode($dizi); | |
| echo 'Json (encoded): '; |
| <?php | |
| class Model_Student_Profile extends ORM { | |
| /** | |
| * Model validation rules | |
| */ | |
| public function rules() | |
| { | |
| return array( |
| <?php | |
| class DateFormat { | |
| const DATE_SHORT = 'Y-m-d'; | |
| const DATE_LONG = 'F j, Y'; | |
| const DATETIME_SHORT = 'Y-m-d H:i'; | |
| const DATETIME_LONG = 'F j, Y, g:i a'; |
| <?php | |
| /** | |
| * Dump the given value and kill the script or continue. | |
| * | |
| * <code> | |
| * // Dump the $data variable and kill the script | |
| * d($data); | |
| * | |
| * // Dump the $data variable and continue the script | |
| * d($data,1); |
| // http://forums.laravel.com/viewtopic.php?pid=6386#p6386 | |
| You can specify different connections in application/config/database.php. The keys for the connections array can be anything, they do not need to be "sqlite", "mysql", etc. | |
| // application/config/database.php | |
| 'default' => 'fred', | |
| 'connections' => array( | |
| 'fred' => array( | |
| 'driver' => 'mysql', | |
| 'host' => 'localhost', |