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 | |
| // app/routes.php | |
| Route::get('locale/{locale}', 'BaseController@setLocale' ); |
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 BaseController extends Controller{ | |
| ... | |
| /** | |
| * setting up the locale | |
| * @param [type] $locale - the parameter from the URL with the locale | |
| */ | |
| public function setLocale($locale = Null) | |
| { |
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 BaseController extends Controller{ | |
| ... | |
| public function setLocale($locale = Null) | |
| { | |
| if(!$locale){ | |
| $mLocale = Config::get( 'app.locale' ); | |
| } | |
| $mLocale = $locale; // Get parameter from URL. |
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 | |
| // app/config/app.php | |
| return array( | |
| .... | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Application Locale Configuration | |
| |-------------------------------------------------------------------------- | |
| | | |
| | The application locale determines the default locale that will be used |
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 TopicCommentsController extends \BaseController { | |
| ... | |
| public function index() | |
| { | |
| $topiccomments = Topiccomment::all(); | |
| return View::make('topiccomments.index', compact('topiccomments')); |
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 | |
| header('Content-type: text/plain; charset=utf-8'); | |
| //declare the number of the post/photo in the $post_nmuber variable | |
| $post_number = ''; | |
| $list = file_get_contents('http://graph.facebook.com/v1.0/' . $post_number . '/likes?pretty=1&limit=600&after=MTAwMDAyNTI4ODAyMDYx'); | |
| $array = json_decode($list); | |
| foreach($array->data as $user){ |
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
| echo "<pre>"; print_r($variable); echo "</pre>"; | |
| exit; |
NewerOlder