Articles of laravel

Laravel 4以及使用FTP部署应用程序的方式

我对用于部署Laravel应用程序的方式有疑问。 我使用Composer在本地开发了我的应用程序。 现在,我准备将此应用程序部署到生产环境中。 我有(目前)一个生产服务器,只使用FTP .. 我已经读过这个论坛: Laravel论坛 但我认为这是不正确的.. 我在我的服务器上创build了一个目录,例如: http : //wwww.myserver.com/app 在/ app目录中,我复制(通过FTP)所有我的文件… 但是这不行。我必须改变一些东西?

Apache重写Laravel / public

对此我很抱歉,但我的根源是错误的,我不能改变这一点。 所以我必须使它在/public文件夹中工作。 我使用正常的Laravel .htaccess文件进行以下重写: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] 如果我打开http://kemtime2_neu.pr.domain.de/public我将redirect到http://kemtime2_neu.pr.domain.de/public/http://kemtime2_neu.pr.domain.de/public/login 我怎样才能解决这个问题? 我很乐意使它从http://kemtime2_neu.pr.domain.de/工作,但得到它与http://kemtime2_neu.pr.domain.de/public/一起工作会没事的。

xampp的Apache重写不工作

我在htdocs中有一个名为crm的文件夹,其中包含一个新的laravel 5.1项目,我试图通过http:// localhost / crm /来访问它,但它只是带来了包含目录内容的页面索引,而不是映射在我的页面routes.php as Route::get('/', function () { return view('panel'); }); 我已经检查Apache的mod_rewrite启用httpd.conf LoadModule rewrite_module modules/mod_rewrite.so DocumentRoot "C:/xampp/htdocs" <Directory "C:/xampp/htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted </Directory> 那么crm / public文件夹中的.htaccess文件包含 <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect Trailing Slashes… RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle […]

Apache Mod重写Laravel

我在Wampserver上安装了Laravel。 目录如下: C:\ WAMP \ WWW \ laravel 现在URL是这样的: http://localhost/laravel/public/index.php/home/index 所以我使用了以下htaccess代码 Options +FollowSymLinks Options -indexes DirectoryIndex index.PHP RewriteEngine on RewriteCond $1 !^(index\.PHP|images|robots.txt) RewriteCond %{REQUEST_ FILENAME} !-f RewriteCond %{REQUEST_ FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L, QSA] 减lessurl到 http://localhost/laravel/public/home/index 但是laravel框架坚持所有应用程序文件驻留在公用文件夹中。 所以我想知道我需要添加到(或从中减去)htaccess文件,以便URL看起来像 http://localhost/laravel/home/index 谢谢

Laravel 3 – 如何安全地存储用户的数据在Ubuntu服务器

在我的Web应用程序中,用户可以上传他们的个人资料图片。 他们可以在线销售他们的手机,所以他们也可以上传他们手机的图片,但是如果我在mylaravel-app/public/(css js images user-photos)存储个人资料图片和手机照片,则其他用户可以将这些照片视为好。 我应该如何将照片存储在另一个目录中,以便只有用户才能看到他们的照片,而且用户也不能从url看到照片的整个目录,如: `site.com/photos (whole directory is exposed )`

Cron Jobs在Ubuntu 16.10 x64上使用Laravel 5.3

我运行的是Digital Ocean的Ubuntu 16.10 x64,并在服务器上部署了PHP Framework的Laravel 5.3.28。 大多数情况下,一切正常工作,但我试图让crontab调用工匠的命令,如php artisan schedule:run艺术家的php artisan schedule:run以便laravel的任务调度程序可以使用。 我不希望下载任何额外的软件包来完成这个工作,因为我觉得应该不需要真正的需要,因为cron可以调用,看起来像什么,如果编码正确,任何命令。 我在做什么: 从内部的crontab -e我试图正确地写入Ubuntu正确的方式来调用php artisan schedule:run 我做了什么: 我目前已经尝试了多种不同的编写这个命令的方法,没有任何工作如下所述: #Attempt for cron SHELL=/bin/bash #PATH=????? <—Confused if this is even needed * * * * * php /path/to/artisan scheduled:run 1>> file.log 2>&1 * * * * * /path/to/php artisan scheduled:run 1>> file.log 2>&1 * * * […]

Laravel 5.2快速入门指南给出未find错误

编辑:我认为这个问题是由于没有正确设置Apache,这两个链接帮助我。 解: http://laravel.io/forum/06-11-2014-not-found-but-route-exists https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts 结束编辑 我正在遵循Laravel 5.2快速入门指南。 https://laravel.com/docs/5.2/quickstart 我正在运行的Ubuntu 14.04.2 该网站最初运行,但后来当我点击添加任务button,我遇到了404未find错误。 根据指南,我运行以下命令来设置完整的快速入门项目。 git clone https://github.com/laravel/quickstart-basic quickstart cd quickstart composer install php artisan migrate 另外我运行下面的命令,因为我在一台Ubuntu服务器上: sudo chown -R www-data.www-data quickstart sudo chmod -R 755 quickstart sudo chmod 777 quickstart/storage routes.php文件如下所示: <?php use App\Task; use Illuminate\Http\Request; Route::group(['middleware' => ['web']], function () { // Route::get('/', function () { […]

存储::移动给“在path找不到文件:”Laravel与Ubuntu

我想要移动一些文件 Storage::move('posts/temp/'.$val,'photos/'.$post->id.'/'.$val); 但它给了我 File not found at path: home/vagrant/Code/…… 有什么特别的configuration可以找吗? 顺便说一句,该文件确实是在找不到的path。

任何人在Ubuntu的环境中成功地使用jonnyw的“php phantomjs”与laravel?

任何人在Ubuntu的环境中成功地使用jonnyw的“php phantomjs”与laravel? 我不知道我是否做错了什么,但我质疑是否有可能在linux中使用laravel。 我得到所有的时间: “执行PhantomJs过程时出错”default“ – 文件不存在或不可执行:bin / phantomjs” 但是我尝试了很多方法和很多方法,但仍然没有成功……(我几乎“确定”,文件是在正确的位置,path是正确的) bin文件夹是777权限…:P在此先感谢。

无法通过作曲者安装laravel安装程序

我试图在我的Ubuntu PC上安装laravel安装程序,但是在安装过程中出现这个错误。 `你的需求无法解决到一套可安装的软件包。 Problem 1 – laravel/installer v1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system. – laravel/installer v1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system. – Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1]. To enable extensions, verify that […]