Git Product home page Git Product logo

blender's Introduction

Blender

Software License StyleCI Quality Score

Blender is the Laravel template that is used for (nearly) all our projects.

You may use our template but please notice that we offer no support whatsoever. We also don't follow semver for this project and won't guarantee that the code (especially the master branch) is stable. In short: when using this, you're on your own.

Install

This guide assumes you're using Laravel Valet

Laravel App

Download the master branch

git clone https://github.com/spatie/blender.git

Make a copy .env.example and rename to .env

Install the composer dependencies

composer install

Finally make sure you have a database named blender, and run the migrations and seeds

php artisan migrate --seed

Assets

Installing Blender's front end dependencies requires yarn.

yarn

Blender uses Laravel Mix to build assets. To build assets run:

yarn run dev

Available build tasks are defined in package.json

Customisation

  • Most of our projects are in Dutch. You can change the language in config/app.php.
  • We use Redactor from Imperavi as text editor but are not licensed to open source this. The text editor is hence degraded to a standard text area unless you comment out this part in resources/assets/back/app.js

Colofon

Contributing

Generally we won't accept any PR requests to Blender. If you have discovered a bug or have an idea to improve the code, contact us first before you start coding.

License

Blender and The Laravel framework are open-sourced software licensed under the MIT license

blender's People

Contributors

alexvanderbist avatar bjrnblm avatar brendt avatar cborgia avatar drbyte avatar freekmurze avatar ianrodrigues avatar ilyar avatar introwit avatar ipalaus avatar jmlallier avatar jorenvanhee avatar laravel-shift avatar lloople avatar matthewtrask avatar mattiasgeniar avatar nikolaynizruhin avatar oussama-tn avatar robindirksen1 avatar rubenvanassche avatar sebastiandedeyne avatar sitesense avatar tjoosten avatar travisobregon avatar tvke avatar twmbx avatar willemvb avatar xavrsl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blender's Issues

Add a fragments api

Right now, we share fragments with the front site requires you to fetch them in the controller, and dump a @javascript directive in the view.

Would be nicer if the server-rendered pages wouldn't care about which fragments the client application needs.

Instead of window.blender.fragments, client applications could load fragments through an API call.

Maybe an excuse to use something fancy like a service worker to proxy requests that have already been loaded ๐Ÿ˜

Either way, loading fragments in the client is a problem that should be solved in a generic way across all projects.

elixir configuration

I do not see the configuration of elixir.
I just see in gulpfile.js
require('blender-gulp');

Tags

Multiple issues, random thoughts:

  • Tags being defined as an n:m has a major issue: It can kill a site if a tag is deleted that a model depends on. Cascading would be too destructive too since it could potentially delete a lot of models
  • Lot's of the tag type code just doesn't feel good. I'd prefer to get rid of type, and having some sort of extendable tag model so we can create one per type, it's not like we need dynamic types anyway
  • Would be nice to have this in it's own repo (either under spatie or spatie-custom)

Kill Foundation?

Foundation pretty much never changes on a per-project basis. Would be better to move this to one or multiple packages.

  • spatie/enum
  • spatie-custom/blender-model (maybe move ModuleModelController there too?)
  • spatie/laravel-tags or spatie-custom/blender-tags

If a project really needs an override, we can just copy the code from the package. I'm not afraid of this situation since I don't think I've ever had to do this, so it would be an edge case.

Page titles

Provide a clean way to set page titles.

Goals

  • Don't clutter views
  • Automatically append site name

Minor updateWithRelations improvement ideas

  • Move the function to it's own class to thin out the models and reduce the barrier of entry of using multiple functions to handle the update
  • Pass in a full request instead of an array (easy access to default values, e.g. $request->get('foo', 'bar'))

Error on installtion

First set up . I got class log doesn't exist before trying to generate app key.

Gulp fails

I installed Blender according to the instructions, ran composer and NPM and then invoked gulp, but then I get the following:

gulp

/var/www/html/node_modules/blender-gulp/gulpfile.js:16
gulp.task('default', callback => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/var/www/html/gulpfile.js:1:63)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

Menu structure

Enable submenus or another hierarchy to structure larger projects.

Refactor tags

Features are good, but the model, trait and repository could use some refactors.

Error: spawn webpack ENOENT

Hello, I am using windows 10 and WAMP, I followed the instructions very well, but I got the above error "Error: spawn webpack ENOENT".

Here is the output from CMD.

[01:25:47] Using gulpfile C:\wamp64\www\blender\gulpfile.js
[01:25:47] Starting 'default'...
[01:25:47] Starting 'webpack'...
[01:25:47] Starting 'svg'...
events.js:160
throw er; // Unhandled 'error' event
^

Error: spawn webpack ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:592:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

Also, during npm install -g webpack, I received the warning below.

npm WARN optional Skipping failed optional dependency /webpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

Looking forward for your help.

Thanks

Fragment improvements

Fragments yaml

  • Move all non Laravel core lang file contents to fragments

Backend

  • Add artisan command to seed fragments

Front usage improvements

  • Variable support

Admin view improvements

  • Add structure to the fragments index (by the first key in it's name?)
  • Flag for non-translatable fragments (would still be a translatable in the database)

Refactor gulp setup

  • move settings to gulpfile
  • clean up configuration
  • move tasks (and mix?) to npm module

Sass refactor

  • All things class
  • Make components reusable for other NPM components
  • Extract generic helpers etc. in NPM packages

Fix odd backend regressions

  • When hitting enter in a form field, an upload dialog appears
  • Hitting submit takes a few seconds to kick in

Sass Compilation Failed

Hi !
I'm trying to install blender on my homestead box. I went through all the installation steps and always run into this error :

[10:24:55] gulp-notify: [Laravel Elixir] Sass Compilation Failed: resources/assets/sass/back/back.scss
Error: file to import not found or unreadable: datatables/media/css/jquery.dataTables
       Current dir:
        on line 7 of stdin
>> @import 'datatables/media/css/jquery.dataTables';
   --------^

{ [Error: resources/assets/sass/back/back.scss
Error: file to import not found or unreadable: datatables/media/css/jquery.dataTables
       Current dir:
        on line 7 of stdin
>> @import 'datatables/media/css/jquery.dataTables';
   --------^
]

I've tried it a few times before posting this issue. Seems like datatables module is installed by the blender.js package but sass doesn't seem to have access to it. Any idea ?

Thanks.

Xavier

EventServiceProvider reflection exception

[ReflectionException]
Class App\Notifications\Eventhandler does not exist

is thrown in a fresh git clone when attempting to run artisan.

I'm working on a fix for this.

Look into removing the breadcrumbs package

We're not actively using breadcrumbs besides the simple ones in the admin section. These could probably be easily replaced by a simple view or helper. If it really is easily replaced, it's not really worth it to keep the dependency.

error when run gulp

hello,

when i run gulp, i get Error: spawn webpack ENOENT, how can i fix it?

Envoy.blade.php - [Httpful\Exception\ConnectionErrorException]

Hello,

I used your Envoy.blade.php and I got Httpful\Exception\ConnectionErrorException.

Do you have any idea? Thanks.

[127.0.0.1]: start deployment
[127.0.0.1]: Already on 'master'
[127.0.0.1]: Your branch is up-to-date with 'origin/master'.
[127.0.0.1]: From gitlab.dev:vendor/project
[127.0.0.1]: * branch            master     -> FETCH_HEAD
[127.0.0.1]: Already up-to-date.
<url> malformed


  [Httpful\Exception\ConnectionErrorException]  
  Unable to connect to "": 3 <url> malformed    


run [--pretend] [--] <task>

Advantage of enums

What is the advantage of defining the roles as enums instead as array as below

public static function getRoles()
{
    return [
        'ADMIN' => 'admin',
        'MEMBER' => 'member'
    ];
}

Menu generation

Abstract the code in Navigation.php for easier menu generation.

Vueification

  • Ajax forms
  • Select
  • Date & time picker
  • Location picker
  • Modals
  • Media
  • Datatables

Parent/child articles

  • An article can select itself as parent in the dropdown
  • Parent/Child relations are not clear in article list view

Easier way to debug email layouts

It would be handy if we could have a more easy way to debug email layouts and test the email template and effect of the CSS inliner.

eg. Use something like resources/email/layout/testContent.blade.php as dummy content to test HTML content and send this with an artisan task like test:email

Browserify Failed!: Cannot find module 'blender-media'

when i run gulp --back, have Browserify Failed!: Cannot find module 'blender-media' this error.

dig into the code, i found the issue is in resource/assets/js/back/app.js, last line code is
require('./media')

if i comment out this line, they run gulp --back, it works without the error.
so looks like missed some file? how can i fix it?

thanks

gulp error - first install

Hi there!

I got an error after following the installation process on gulp...

events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: spawn webpack ENOENT
    at exports._errnoException (util.js:890:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Function.Module.runMain (module.js:449:11)
    at startup (node.js:146:18)
    at node.js:404:3

What am I missing here?

Thanks!

404 inconsistency

blender.dev/nl/qsdfqdfqs gives a SQL error / whoops
blender.dev/nlqsdfqdfqs gives a 404

Error when I run gulp

[12:47:09] Using gulpfile ~/code/blendup/gulpfile.js
[12:47:09] Starting 'default'...
[12:47:09] Starting 'webpack'...
[12:47:09] Starting 'svg'...
[12:47:10] Finished 'svg' after 915 ms
Hash: c1175115de18d3b5b80f
Version: webpack 2.1.0-beta.2
Time: 97818ms
Asset Size Chunks Chunk Names
back.media.js 1.32 MB 0 [emitted] back.media
front.head.js 45.1 kB 1 [emitted] front.head
front.app.js 340 kB 2 [emitted] front.app
front.validation.js 42.9 kB 3 [emitted] front.validation
back.chart.js 126 kB 4 [emitted] back.chart
back.vendor.js 271 kB 5 [emitted] back.vendor
back.editor.js 3.05 kB 6 [emitted] back.editor
back.head.js 46.6 kB 7 [emitted] back.head
back.app.js 1.25 MB 8 [emitted] back.app
rev-manifest.json 334 bytes [emitted]
[86] multi back.vendor 28 bytes {5} [built]
+ 345 hidden modules

this is the error

ERROR in Entry module not found: Error: Can't resolve 'style' in '/home/vagrant/code/blendup/resources/assets'

ERROR in Entry module not found: Error: Can't resolve 'style' in '/home/vagrant/code/blendup/resources/assets'

ERROR in ./js/back/modules/editor.js
Module not found: Error: Can't resolve '../redactor/langs/nl.js' in '/home/vagrant/code/blendup/resources/assets/js/back/modules'
@ ./js/back/modules/editor.js 12:0-34

ERROR in ./js/back/modules/editor.js
Module not found: Error: Can't resolve '../redactor/redactor/redactor.js' in '/home/vagrant/code/blendup/resources/assets/js/back/modules'
@ ./js/back/modules/editor.js 10:0-43

ERROR in ./js/back/modules/editor.js
Module not found: Error: Can't resolve '../redactor/plugins/imagemanager.js' in '/home/vagrant/code/blendup/resources/assets/js/back/modules'
@ ./js/back/modules/editor.js 14:0-46

ERROR in ./js/back/modules/editor.js
Module not found: Error: Can't resolve '../redactor/plugins/video.js' in '/home/vagrant/code/blendup/resources/assets/js/back/modules'
@ ./js/back/modules/editor.js 16:0-39
[12:48:51] Finished 'webpack' after 1.68 min

Leverage pjax in back

The backsite could be sped up quite a bit by using pjax when using the main navigation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.