Example #1
0
Route::post('admin/category/create', array('middleware' => 'auth', 'as' => 'admin.category.store', 'uses' => 'CategoryController@store'));
Route::get('admin/category/destroy/{categoryId}', array('middleware' => 'auth', 'as' => 'admin.category.destroy', 'uses' => 'CategoryController@destroy'));
Route::get('admin/category/edit/{categoryId}', array('middleware' => 'auth', 'as' => 'admin.category.edit', 'uses' => 'CategoryController@edit'));
Route::post('admin/category/edit/{categoryId}', array('middleware' => 'auth', 'as' => 'admin.category.update', 'uses' => 'CategoryController@update'));
Route::get('admin/gcm_device', array('middleware' => 'auth', 'as' => 'admin.gcm_device.index', 'uses' => 'GCMDeviceController@index'));
Route::get('admin/gcm_device/destroy/{gcmDeviceId}', array('middleware' => 'auth', 'as' => 'admin.gcm_device.destroy', 'uses' => 'GCMDeviceController@destroy'));
Route::get('admin/web_setting', array('middleware' => 'auth', 'as' => 'admin.web_setting.index', 'uses' => 'WebSettingController@index'));
Route::post('admin/web_setting', array('middleware' => 'auth', 'as' => 'admin.web_setting.update', 'uses' => 'WebSettingController@update'));
Route::get('sitemap.xml', function () {
    header('Content-Type: application/octet-stream');
    header("Content-Transfer-Encoding: Binary");
    header("Content-disposition: attachment; filename=\"sitemap.xml\"");
    $sitemap = App::make("sitemap");
    $sitemap->setCache('laravel.sitemap', 3600);
    if (!$sitemap->isCached()) {
        $sitemap->add(URL::to('/'), date('Y-m-dTH:i:s+00:00'), '0.5', 'weekly');
        $posts = App\Models\PostModel::orderBy('updated_at', 'desc')->get();
        foreach ($posts as $post) {
            $sitemap->add(route('blog.show', $post->slug), date('Y-m-dTH:i:s+00:00', strtotime($post->updated_at)), '0.5', 'weekly');
        }
        $tags = App\Models\TagModel::all();
        foreach ($tags as $tag) {
            $sitemap->add(route('blog.tag', $tag->slug), date('Y-m-dTH:i:s+00:00'), '0.5', 'weekly');
        }
        $categories = App\Models\CategoryModel::all();
        foreach ($categories as $category) {
            $sitemap->add(route('blog.category', $category->slug), date('Y-m-dTH:i:s+00:00'), '0.5', 'weekly');
        }
    }
    return $sitemap->render('xml');
});
Example #2
0
		<table class="striped">
			<thead>
				<tr>
					<th data-field="id" style="text-align:center;" width="50">#Id</th>
					<th data-field="name" style="text-align:left;" width="250">Descrição</th>
					<th data-field="name" style="text-align:left;" width="120">Valor</th>
					<th data-field="name" style="text-align:left;" width="120">Categoria</th>
					<th data-field="name" style="text-align:center;" width="50">Tipo</th>
					<th data-field="name" style="text-align:center;" width="230">Lançado em</th>
				</tr>
			</thead>
			<tbody>
				<?php 
if (is_array($this->get("releases"))) {
    foreach ($this->get("releases") as $release) {
        $categorya = new App\Models\CategoryModel();
        $categorya->id = $release['category_id'];
        $resultCategory = $categorya->get();
        $release['type'] = $release['type'] == "expense" ? "trending_down" : "trending_up";
        $type_color = $release['type'] == "trending_down" ? "font-red" : "font-green";
        ?>
						<tr>
							<td style="text-align:center;"><?php 
        echo $release['id'];
        ?>
</td>
							<td style="text-align:left;"><?php 
        echo $this->textLimit($release['description']);
        ?>
</td>
							<td style="text-align:left;">R$ <?php