[PR]
×
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
Route::controller('/top/second', 'second/SecondController');
Route::controller('/top/second', 'second.SecondController');
Route::controller('/top', 'TopController');
Route::controller('/top/second', 'SecondController');
Route::controller('/top/third', 'ThirdController');
Route::group(['prefix' => 'top'], function() {
Route::controller('/', 'TopController');
Route::controller('/second', 'SecondController');
Route::controller('/third', 'ThirdController');
});
Route::group(['prefix' => 'top'], function() {
Route::controller('/second', 'SecondController');
Route::controller('/third', 'ThirdController');
Route::controller('/', 'TopController');
});
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"maatwebsite/excel": "1.*",
"tecnick.com/tcpdf": "~6.0.0"
$ cd vendor/tecnick.com/tcpdf/tools
$ php ./tcpdf_addfont.php -b -t TrueTypeUnicode -f 32 -i ./ipag.ttf
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
$data = [
'sampleModelObject' => $sampleModelObject
];
Excel::create('sample', function($excel) use($data) {
$excel->sheet('sample', function($sheet) use($data) {
$sheet->setFontFamily('ipag');
// PDFを横にしたい場合
$sheet->setOrientation('landscape');
$sheet->loadView('test.pdf_view', $data);
});
})->export('pdf');
})->store('xls')->export('pdf');
$data = [
'sampleModelObject' => $sampleModelObject
];
$pdf = PDF::loadView('test.pdf_view', $data);
return $pdf->download('sample.pdf');
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
'pdf' => array(
/*
|--------------------------------------------------------------------------
| PDF Drivers
|--------------------------------------------------------------------------
| Supported: DomPDF, tcPDF, mPDF
*/
'driver' => 'DomPDF',
Most of the HTML tags are supported.
Most of the general styles are supported.
$ php artisan env
php artisan env
すると、なぜか Current application environment: production
と出てきます。$env = $app->detectEnvironment(array(
'local' => array('homestead'),
));
$ hostname
localhost.localdomain
$env = $app->detectEnvironment(array(
'local' => array('homestead'),
'development' => array('localhost.localdomain'),
));
Current application environment: development
App::environment();
php artisan routes
sudo vim /etc/httpd/conf/httpd.conf
DocumentRoot "/var/www/html/laravel/public/"
<Directory "/var/www/html/laravel/public">
Allowoverride All
</Directory>
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</ifModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</ifModule>
RewriteRule ^ /index.php [L]
RewriteRule ^(.+)$ /index.php/$1 [L]
ls -l app