Laravel 5.1, moving folders - laravel

I've got a simple Laravel app that I've just been told that the public DIR has to be in quite a different place to the core code.
I need to have s'thing like this:
folder-root
| - site
| - | - someFolder
| - | - | - codeFolder
| - | - | - | - app
| - | - | - | - bootstrap
| - | - | - | - config (etc etc etc)
| - newPublicFolder
| - | - index.php
I've copied all my files to this structure locally and altered my public index.php file to point to the bootstrap/autoload.php file and can echo out test variables from that file, so I know it is pointing it to it correctly.
Is there a guide anywhere to do this, or is there a config file I'm missing?
UPDATE: This is from my apache error log:
PHP Fatal error: Call to a member function make() on a non-object in /var/www/test/site/public/index.php on line 49
UPDATE 2:
I've ONLY copied the files over. The DB remains the same and I've not run any compser updates or anything.. if that makes a differnce?
Cheers!

To all in the same boat and here because of a Google search..
I'd copied line 22 and pasted into line 36.
I'd missed that the first was to 'autoload.php' and the second was to 'app,php'
Rookie mistake, but if it helps you.. all good..

Related

Windows directory juction: no files are copied via network access

I have a problem with file storage organization.
There is a network of Windows 7 and Windows XP computers. One of them is a file storage server.
Software packs are located on the storage server. Each software pack includes
1. active folder;
1. some folders for each program.
(see the structure example below)
Active folder is a structure of the actual program's versions, must allow to copy all the software in their actual versions avoiding file's duplicating via direct copying. Also fast switching of actual version is needed.
Program folders contain folders for each program's version.
I tried to solve the task via windows directory junction. I created the links via Far Manager 3, command Alt+F6, type directory junction.
Desired structure example
+---active % 389 MB, desired package of actual software
| +---notepad++ % directory junction
| | \---7.3.1
| | npp.7.3.1.Installer.exe
| | npp.7.3.1.Installer.x64.exe
| |
| +---octave % directory junction
| | \---4.2.1
| | octave-4.2.1-w32-installer.exe
| | octave-4.2.1-w64-installer.exe
| |
| \---texstudio % directory junction
| \---2.12.4
| texstudio-2.12.4-win-qt5.6.2.exe
|
+---notepad++
| +---6.8.8
| | npp.6.8.8.Installer.exe
| |
| \---7.3.1 % actual version
| npp.7.3.1.Installer.exe
| npp.7.3.1.Installer.x64.exe
|
+---octave
| +---4.2.0
| | octave-4.2.0-w32-installer.exe
| | octave-4.2.0-w64-installer.exe
| | octave-4.2.0-w64.zip
| |
| \---4.2.1 % actual version
| octave-4.2.1-w32-installer.exe
| octave-4.2.1-w64-installer.exe
|
\---texstudio
+---2.11.0
| texstudio-2.11.0-win-qt5.5.1.exe
|
+---2.12.0
| texstudio-2.12.0-win-qt5.6.2.exe
|
+---2.12.2
| texstudio-2.12.2-win-qt5.6.2.exe
|
\---2.12.4 % actual version
texstudio-2.12.4-win-qt5.6.2.exe
Local usage
Local means I operate on the storage server's Windows GUI.
If to copy active folder to another server's folder observed result is the same as desired:
TEST_COPY
\---active % 389 MB, all the files are copied
+---notepad++
| \---7.3.1
| npp.7.3.1.Installer.exe
| npp.7.3.1.Installer.x64.exe
|
+---octave
| \---4.2.1
| octave-4.2.1-w32-installer.exe
| octave-4.2.1-w64-installer.exe
|
\---texstudio
\---2.12.4
texstudio-2.12.4-win-qt5.6.2.exe
Network file access
If to access to the storage server's active folder via network sharing and copy it the desired result does not happen.
Of course, tree /A /F command shows the same structure of the copied tree, but active is 0 MB size and child folders notepad++, octave, texstudio are also zero-sized and empty.
TEST_COPY
\---active % 0 MB, no any files, only subfolders
+---notepad++
| \---7.3.1
|
+---octave
| \---4.2.1
|
\---texstudio
\---2.12.4
Only if try to copy directly directory junctions subfolders inside active folder (7.3.1, 4.2.1, 2.12.4) the content will be copied as desired. But every user wants to copy active folder, not its second level childs.
BTW. Sometimes when trying to copy an error occurred: file/folder already exists, and copy process was broken unexpectedly.
May be links are set up wrong or there are other methods to reach the desired result.

djangocms text_ckeditor wordcount plugin

I am working in a djangocms project that uses the djangocms_text_ckeditor https://github.com/divio/djangocms-text-ckeditor
I would like to integrate a wordcount plugin similar to this https://github.com/w8tcha/CKEditor-wordcount-Plugin
Have someone of you did this before successfully? It would be great if I could get the plugin via pip or so, not downloading and including it in the project. And also, how would the CKEDITOR_SETTINGS look like?
I couldn't find any workaround, just a similar post but that does not use this djangocms text editor for that purpose.
Thanks in advance!
The extension is a javascript plugin for the ckeditor (as opposed to a djangocms plugin).
To load a javascript plugin two steps are needed:
Make the js plugin resources available to ckeditor. This is done through static folder in your project wich includes all js, css etc. files. In the static folder create the folders djangocms_text_ckeditor/ckeditor/plugins. Copy the js plugin into this folder. In your case thats the whole folder wordcount. The directory tree should look like
static
|
+---djangocms_text_ckeditor
| |
| +---ckeditor
| | |
| | +---plugins
| | | |
| | | +---wordcount
| | | | |
| | | | +---css
| | | | +---lang
| | | | +---plugin.js
Let the djangocms plugin ckeditor know about the js plugin. To this end, look for the setting CKEDITOR_SETTINGS in your project's settings.py file. If it is not there create it. It's a dictionary that is used, e.g., to configure the toolbars. In this dictionary have a key extraPlugins with a string value that consists of comma separated names of plugins to load, e.g.,
CKEDITOR_SETTINGS = {
...,
'extraPlugins': 'cmsplugins,wordcount,glyphicons,...',
...,
}
Hope that works for you.

InDesign - how do I know if an image already placed?

I am working on a book with many images, and I want to ensure that I place each picture only once. Is there a way to tell indesign to to check if image exist before placing it? Or a way to define a preflight profile for it?
Thank you,
Omer
You should be able to see a list in the links panel.
It shows the number of times and the page number it appears on.
example:
Name | ! | Pg |
--------------------|---|----|
my-image.psd (2) | | |
my-image.psd | | 1 |
my-image.psd | | 4 |

laravel: implementing section from a pulled-in subview

Here's the structure of my templates:
master
#yield('master1')
#yield('master2')
dashboard
#extends('master')
#section('master1')
#include('sub-1')
submaster
#yield('submaster1')
sub-1
#extends('submaster')
#section('submaster1')
#section('master2') <-- this is what I am trying to do
Here's a more visual representation
master submaster
#yield('master1') #yield('submaster1')
#yield('master2') |
| |
|___ dashboard |
#extends('master') |
#section('master1') |
#include('sub-1') |
| |
|_______ sub-1 _______|
#extends('submaster')
#section('submaster1') <-- from the right
#section('master2') <-- from the left
Is this kind of thing possible with Blade? when I remove the implementation of master2 from sub-1, everything works fine. when I add it back in, the code from submaster continues to render, the code in master2 seems to work and get included in the expected place, but the code in submaster1 stops getting included in the appropriate sections in submaster.

Magento - error importing images with import/Export module and symbolic links

Capistrano is in charge of deploying my magento in all environments. The structure we work with is as follows:
Website
| current
| | media ---ln---> /var/www/website/aplication/shared/media
| | | import
| | | | p
| | | | | a
| | | | | | patata.jpg
When I try to import a CSV with a list of products with the image gallery, the images aren't imported. I have noticed that it's not possible to upload images from the backend either when "media" is a symbolic link.
What can I do to make it work with symbolic links? Has anyone had this problem before?
You should try the MAgmi Image attributes processor.
It allows images to be uploaded even from a third party URL.

Resources