GithubHelp home page GithubHelp logo

themsaid / wink Goto Github PK

View Code? Open in Web Editor NEW
2.8K 71.0 376.0 4.5 MB

A Laravel-based publishing platform

License: MIT License

PHP 21.16% JavaScript 13.41% Vue 56.79% SCSS 5.01% Blade 3.64%
laravel blogging publishing

wink's People

Contributors

2bj avatar ahmedash95 avatar assertchris avatar avosalmon avatar ben182 avatar bilias23 avatar caneco avatar clarkewing avatar conroyp avatar danpastori avatar dependabot[bot] avatar diaafares avatar divineomega avatar ibrunotome avatar josiasmontag avatar kavanpancholi avatar khawlahelshah avatar kylebarney avatar lloople avatar lucasmichot avatar lukeraymonddowning avatar mabasic avatar mallardduck avatar ninjaparade avatar pkracer avatar shylor avatar skoyah avatar swapnilsarwe avatar themsaid avatar tvbeek 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  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

wink's Issues

[IDEA] Have WinkAuthor extend base User class

Note: I don't have any experience with Wink yet, still planning on setting it up and playing with it later. That said, this is just based on looking over code here in the repo.

As the title suggests, in general I think it would be nice to not have Wink duplicate efforts for Users. In an application I've built with multiple user types/roles I had success with extending the base User class. I was thinking a similar approach may be beneficial here - especially for integrating Wink into Laravel applications with other User based features.

I know that this idea is no simple feat - as Wink would have to be aware (in some way) if it needs to provide a complete WinkAuthor or an extended User one based on the existing app. All the while maintaining the same relationships to this user class that WinkAuthor currently has. I also know that this would be an easier task if Laravel had a more standardized 'stock' User.

So what are the thoughts about this concept, or going this direction?

Is jQuery necessary?

Related with issue #53 @themsaid said that Wink was longer using Bootstrap. So the bootstrap dependency was removed as well as popper.js. Shouldn't we also remove the jQuery dependency?

Can the editor of Wink be used as a seperate package?

I know that the editor uses Quill under the hood.
But the modifications are looking very very good, and i was wondering if and how this can be used as a stand-alone package for laravel for projects with less needs that wink is offering solutions to them.
Thanks.

Image upload storage path

When using public disk, it create public folder with in the app/public folder

screenshot from 2018-11-18 13-22-52

I think the storage directory should be 'wink/images' instead of 'public/wink/images' in ImageUploadsContoller@upload

RTL support?

Hello, and thanks for this great package.
I s there any built in way to configure wink(and all assets, not just editor) to use RTL?
Thanks.

Slug doesn't update when changed.

  1. When I clicked the settings button for the post, it had: 5e51cfe1-5cad-4d50-9ba1-7d12752522ca and I updated to 6-reasons-blah-blah and it keeps showing when I check the settings but it doesn't update in the URL, the URL stays 5e51cfe1-5cad-4d50-9ba1-7d12752522ca even after refreshing / updating the post.

  2. How do you share posts/blog with the public? Is it just the URL to the page? Trying to go to "url.com/blog" just takes me to the login page. (I've updated the path in config/wink.php) Do I need to straight up make a controller to handle it? I thought that would all be built in.

  3. Also, even after updating the path in config/wink.php when I logout, it uses the 'wink/logout' path, should it not update with the path as well?

I really really want to use this but don't want to think it's much further along than it is. Thanks for your hard work and I really think this could replace Ghost.

WYSIWYG (Quill) and XSS

XSS are possible : add <a href="#" onclick="javascript:alert('XSS');return false;">XSS</a> in a WinkPost or WinkPage body.

The only reason flat out script tags arent run is because you always output the WinkPost 'body' in a Quill editor which protects you by default by not running those. If later we wants to use the WinkPost model in another part of his app (public facing urls for example), everything would blow up.

It's usually not considered secure to let the frontend do the sanitization of WYSIWYG comming from database. I can easily bypass the quill editor and post anything to the backend using handcrafted requests. Using HTMLPurifier on output/json serialization/getBodyAttribute accessor would make this secure by default.

As of today, compromission of any account means potential compromission of all of those who would click a tampered link.

If XSS prevention is not something you want to cover, as it's usually a pain with WYSIWYG content, at the very least some clear disclaimer should be added to the readme.

Publish assets

Although I fully understand wink's philosophy of being something simple and intuitive, I would like to propose that assets be published directly in the project so that it can be adapted to any template for admin and that allows it to be extended to add specific functionalities to the needs of the person using this.

[Road Map] Create an initial theme that people can use right away.

@themsaid I was thinking I can handle this feature of the Roadmap.

Before starting I would like to make a few questions:

  • Would you like to have a route macro like Route::winkDefault()? Once the package is installed, you just would need to add that line to your route files to load the default theme routes
  • Would it be correct to create a command like php artisan wink:default-theme or something like that to copy the assets (css mostly) to the public folder? There will be no need on copying views since that can be loaded from package folder. Some place like public/vendor/wink/default.css. Otherwise the default.css can be created on current install command.
  • I'm not good at the design, so I was thinking of copying your current theme on themsaid.com for now (without the top bar, and routes inside blog just in case it's installed in a currently running app). Would that be appropriate? Simple & Minimal

Upload Avataar - filter in the file select dialog box

Ability to filter the images in the select box while selecting an avatar.

Priority: Low

changing

<input type="file" class="d-none" id="author_avatar" v-on:change="uploadSelectedImage">

to

<input type="file" class="d-none" id="author_avatar" accept="image/*" v-on:change="uploadSelectedImage">

Built in comments system

Hello,
I'm thinking about sending a PR for built in comments system.
Is it okay to use a third party package actuallymab/laravel-comment to pull in comments functionality or do we want to implement it from the scratch?

Database [database] not configured

I have configured my env. file correctly and

DB_DATABASE=database
DB_USERNAME=root
DB_PASSWORD=

WINK_DB_CONNECTION=database

run php artisan config:cache & php artisan config:clear same results.

but when i run the command

php artisan migrate
Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated:  2014_10_12_100000_create_password_resets_table
Migrating: 2018_10_30_000000_create_tables
Migrated:  2018_10_30_000000_create_tables
Migrating: 2018_11_16_000000_add_meta_fields
Migrated:  2018_11_16_000000_add_meta_fields

wink tables seems migrating. but when navigating to the wink route giving the same error?

[Road Map] Dark Theme

For the dark theme,

  • Would you rather save the settings on local storage,
  • A field in the wink_users table,
  • Add a new table (wink_user_settings) that stores this setting and/or any new future user setting added to the application?
  • Create new stylesheet for dark theme and override tailwind classes,
  • Check dark/light settings per component and add/remove tailwind classes accordingly?

Allow running wink:migration on production without any prompt

As the title suggests, it should be possible to pass --force to the command. My database migrations are taken care of by the deploy script that I use. So, if wink:migrate can also support that, it will also allow future wink migrations to be automatically executed when the package is updated.

[Suggestion] Post Categories

I thought this would be a nice progression for this project, I'm typically finding that I want a category for a blog post and not just a list of tags

I understand that tags can be used in it's place

[note] Going to use this for my podcast site in a few weeks.

I've create a podcast and at the moment I'm being super lazy and manually adding each new episode. I'll be keen to give this a go and offer up feedback with anything where I had an issue. Each podcast is just an iframe with some show notes :)

Pinned Posts [Help Wanted]

Pinned posts would add a layer of post sorting when retrieving and displaying posts. The functionality would work much like a Pinned Tweet where the pinned post would display first in any list of posts in which it was retrieved.

Feature Requirements:

  • Removed the Pinned Post from the WinkPost query results and place it at the top of the results collection without otherwise altering the order of the results.
  • Facilitate reordering via a Collection Marco
  • Add a "Pin this Post" checkbox field to the General Settings Menu.
  • Add an "is_pinned" tinyint field to the wink_posts table.

Questions Remaining

  1. Should we only allow one pinned post? If so, when one is ready to mark a post as pinned and a pinned post already exists, do we automatically remove the previous pin? Or, do we alert the user and show the previously pinned post's title with the option to continue or cancel the pin override?

  2. Should we allow multiple pins? If so, a Pinned Post view would be recommended for easier identification of pinned posts and easy unpinning.

  3. Should we include a "pin_until" datetime field on the wink_posts table that allows the author to pin their post until a specific time?

  4. Where to implement the Collection Marco? A service provider seems the appropriate place, but one would need to be added to the project and alter the installation instructions. Alternatively, it could be added directly to the WinkPost Model.

I'd be happy to implement this feature after some guidance on what would be the best route to implementation.

error while migration

InvalidArgumentException : Database [winkdb] not configured.

at C:\xampp\htdocs\wink\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:140
136| // If the configuration doesn't exist, we'll throw an exception and bail.
137| $connections = $this->app['config']['database.connections'];
138|
139| if (is_null($config = Arr::get($connections, $name))) {

140| throw new InvalidArgumentException("Database [{$name}] not configured.");
141| }
142|
143| return $config;
144| }

Exception trace:

1 Illuminate\Database\DatabaseManager::configuration("winkdb")
C:\xampp\htdocs\wink\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:103

2 Illuminate\Database\DatabaseManager::makeConnection("winkdb")
C:\xampp\htdocs\wink\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:74

Please use the argument -v to see more details.

Yarn upgraded version throws error when compiling

I had the yarn version 1.2.1 but when I upgraded it to the latest version It was unable to compile the assets due to an error with the node-sass. What I ended up doing was to delete the current yarn.lock file and run yarn and yarn run dev again. Everything is working fine now. How should we proceed to with the yarn.lock file now? Should we delete or commit a new yarn.lock?

No tests present

Do you have any plans to add tests for Wink? I couldn't find it on the roadmap 🙂

Could not open input file: artisan

Getting "Could not open input file: artisan" after php artisan wink:install. I have other Laravel apps running well on same server so nothing wrong with the environment.

May you please update readme file? I cant figure out how to install your code. Looking forward to try out Wink.

Thank you in advance.

Cannot load wink

I followed all the steps on the CONTRIBUTING guide but when I try to access the wink backend, I get the following error:

"Undefined index: /light.css (View /Users/..../resources/views/login.blade.php)"

Did I do something wrong?

Uninstall undocumented

Is there a documentation around easy uninstall or should I manually remove the migration after removing the package from composer ?

WordPress Importer

It would be great if we can have a tool to import Authors/Tags/Pages/Posts from WordPress. Don't have clear goal for this yet but hoping you guys can help :)

Use of bcrypt in TeamController

TeamController@store uses bcrypt function. Since Wink requires at least Laravel 5.7, maybe it will be better to use Hash facade instead of bcrypt.

Which key for unsplash integration

Hi thanks for the great project.

I wanted to be able to use the unsplash integration but I am not sure which token I have to use. I saw in the code that I have to set the unsplash key in the services directory:

// src/Wink.php line 15
'unsplash_key' => config('services.unsplash.key'),

But when I create an app on unsplash I only get two keys which both must be remain confidential
image

I found out that the request works with the access key. But by exposing it to the frontend it is not confidential anymore.

What would be the correct solution for that? Or is the unsplash documentation just missleading?

Thanks,

Silvan

php artisan wink:migrate does nothing

As per instructions, running php artisan wink:migrate should give me default login credentials. However this is what happens for me:

21:14:55  javorszky@GaborrMBP  ~/Sites/wink  ⬡ v10.6.0  12s 
$ composer require writingink/wink
Using version ^0.0.1 for writingink/wink
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing writingink/wink (v0.0.1): Loading from cache
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: writingink/wink
Package manifest generated successfully.

 21:15:25  javorszky@GaborrMBP  ~/Sites/wink  ⬡ v10.6.0  14s 
$ php artisan wink:install
Publishing Wink Assets...
Publishing Wink Configuration...
Wink was installed successfully.

 21:15:35  javorszky@GaborrMBP  ~/Sites/wink  ⬡ v10.6.0 
$ php artisan wink:migrate
Nothing to migrate.

To further complicate things, I haven't set up a different database connection for wink, but decided to reuse the one laravel uses (because why not...)

Use of AbstractWinkModel?

Any reason why we are extending all of the models with AbstractWinkModel?

From what I can see the only real use they are providing is overriding the DB Connection for Wink.

We can Reduce the WinkAuthor code by half by extending from Illuminate\Foundation\Auth\User, using AbstractWinkModel as a trait and removing all the redundant code.

I think this will help us keep the WinkAuthor model close to Laravel defaults

Feature Request: Sitemap

A website (or a part of it) should have a sitemap.

@themsaid Do you plan such a feature? Or do you prefer a PR for that? I can implement that, if you want to.

Custom Components/Parsers

This ticket addresses the concept of allowing custom, extensible "markup" to be added to the body of a post, and then parse it in a controller method created by the dev. In my initial implementation I am using JSON format for the "markup". For example, adding {{ OGBadge: http://completecodesolutions.com }} to a post body will result in a controller method firing that pulls OG data from that URL, and returns some HTML that displays the retrieved data. The idea is that devs could use their own tags such as {{ Anything: "red" }} or {{ SomethingElse: { "color": "blue" } }} and then create Controller methods parseAnything() or parseSomethingElse that return some custom dynamic markup.

Background: I'm starting a blog using Wink, and in one of my first posts I wanted to display a link out to another site. I figured using the OpenGraph data that the external site provides in its header would be a great choice. I found a nice package to retrieve and parse the OG data. But then what? How can I get a dynamic blog post to somehow utilize this package and return a "badge" with the og data retrieved from the external site? Not seeing an existing way to do that, I thought "how about allowing custom markup in the post body, which is then parsed by a custom method on my BlogController."

As a side note, I'm sure there is a better term for this than "custom markup"... "Custom tags" was my first thought, but "tags" conflicts with the existing feature. Perhaps "custom component."

Here is my initial implementation. I have a model at App\WinkPost that extends \Wink\WinkPost. All of my Controllers reference this "local" Model. This is a common practice I do. To parse out any "custom components" that are wrapped in {{ }} I have this method on my WinkPost model:

    public function parseCustomTags() {
        $chunks = preg_split("/([{}]{2})/", $this->body, -1, PREG_SPLIT_DELIM_CAPTURE);

        $parsed = '';
        $in_tag = false;
        foreach ($chunks as $chunk) {
            if ($chunk === '{{') {
                $in_tag = true;
                continue;
            }
            else if ($chunk === '}}') {
                $in_tag = false;
                continue;
            }

            if ($in_tag) {
                $tag = json_decode('{' .trim($chunk). '}');
                foreach ($tag as $k=>$v) {
                    if (method_exists($this, 'parse' .studly_case($k))) {
                        $parsed .= call_user_func('App\WinkPost::parse' .studly_case($k), $tag->OGBadge);
                    }
                }
            }else{
                $parsed .= $chunk;
            }
        }

        $this->body = $parsed;

        return $this;
    }

Then, if I place {{ "OGBadge": { "src": "https://completecodesolutions.com/" } }} within the post body, parseCustomTags() will in turn fire the following function and add the return to the post body (replacing the "custom component"):

    public static function parseOGBadge($data) {
        $og_data = OpenGraph::fetch($data->src);

        $title = isset($og_data['title']) ? $og_data['title'] : null;
        $description = isset($og_data['description']) ? $og_data['description'] : null;
        $url = isset($og_data['url']) ? $og_data['url'] : $data->src;
        $image = isset($og_data['image']) ? $og_data['image'] : null;

        return view('blog.partials.ogbadge', compact(
            'title',
            'description',
            'url',
            'image'
        ));
    }

The only other piece is that in my show() method on my BlogController, after retrieving the Post I execute $post->parseCustomTags();.

So that's my proof-of-concept. I'm not sure if you might feel this concept is outside of the scope of the intentions of this package, but I thought I would bring it up in case you are interested. Another option would be to integrate similar functionality into the WYSIWYG kitchen sink/controls. I know that the Wink package is aimed at developers, so I thought "allowing people to type a little JSON into the WYSIWYG maybe isn't such a bad thing" ;)

Migrate causes error

When i migrate i get the following error:

Migrating: 2018_10_30_000000_create_tables
Migrated:  2018_10_30_000000_create_tables
PHP Warning:  Uncaught ErrorException: Object of class Ramsey\Uuid\Codec\StringCodec could not be converted to string in /Users/matt/www/elevio-website/vendor/laravel/telescope/src/Watchers/ModelWatcher.php:35
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(4096, 'Object of class...', '/Users/matt/www...', 35, Array)
#1 /Users/matt/www/elevio-website/vendor/laravel/telescope/src/Watchers/ModelWatcher.php(35): implode('_', Array)
#2 /Users/matt/www/elevio-website/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(357): Laravel\Telescope\Watchers\ModelWatcher->recordAction('eloquent.create...', Array)
#3 /Users/matt/www/elevio-website/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(209): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('eloquent.create...', Array)
#4 /Users/matt/www/elevio-website/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(162): Illuminate\Events\Dispatcher->dispatch('eloquent.create...' in /Users/matt/www/elevio-website/vendor/laravel/telescope/src/Watchers/ModelWatcher.php on line 35
PHP Fatal error:  Object of class Ramsey\Uuid\Converter\Number\BigNumberConverter could not be converted to string in /Users/matt/www/elevio-website/vendor/laravel/telescope/src/Watchers/ModelWatcher.php on line 35

   Symfony\Component\Debug\Exception\FatalErrorException  : Object of class Ramsey\Uuid\Converter\Number\BigNumberConverter could not be converted to string

  at /Users/matt/www/elevio-website/vendor/laravel/telescope/src/Watchers/ModelWatcher.php:35
    31|         if (! $this->shouldRecord($event)) {
    32|             return;
    33|         }
    34| 
  > 35|         $model = get_class($data[0]) . ':' . implode('_', (array) $data[0]->getKey());
    36| 
    37|         $changes = $data[0]->getChanges();
    38| 
    39|         Telescope::recordModelEvent(IncomingEntry::make(array_filter([


   Whoops\Exception\ErrorException  : Object of class Ramsey\Uuid\Converter\Number\BigNumberConverter could not be converted to string

  at /Users/matt/www/elevio-website/vendor/laravel/telescope/src/Watchers/ModelWatcher.php:35
    31|         if (! $this->shouldRecord($event)) {
    32|             return;
    33|         }
    34| 
  > 35|         $model = get_class($data[0]) . ':' . implode('_', (array) $data[0]->getKey());
    36| 
    37|         $changes = $data[0]->getChanges();
    38| 
    39|         Telescope::recordModelEvent(IncomingEntry::make(array_filter([

Error when compiling assets

After running yarn run dev or npm run dev, it seems that 2 dependencies are missing: Bootstrap and Popper.js. They way to get around this is to install them manually. I think the problem is that they are not declared on the package.jsonfile.

Post always reverts to Published

I just created a new Laravel project and installed Wink, but I'm getting the following behavior when editing posts:

  • I create a post but I don't publish it
  • I set the post as a draft again
  • After reloading, the post reverts its status to published again.

ezgif-5-bedd93d1f844

Make Wink's Auth work with / defer to the parent project's Auth

The use-case:
Suppose you have a complex Laravel webapp and want to add a blog to it. Your options are to use Wordpress or find something in Laravel like Wink (I strongly prefer a laravel solution, despite the strength of the Wordpress ecosystem of plugins and themes).

Here's why the Auth piece is important:

  1. You don't want to have 2 Auth systems (parent project and Wink)...you want your users to have ONE shared login system (that could either by email based and/or powered by Socialite for FB / Google / Linkedin / Github logins). This is huge for me because I want my users to be logged in in both places without having to create multiple accounts
  2. As a developer I don't want to have to maintain 2 login systems (Auth of my main Laravel app, Wink's auth) that I have to sync constantly.

So, Making Wink's Auth work with / defer to the parent project's Auth would be a very common (and strong) use-case.

Scopes for published and published_date

Given their extensive usage, it would be useful to add scopes regarding posts' published and published_date fields. I was thinking something along those lines:

  • scopePublished() and scopeUnpublished()

  • scopedBeforePublishedDate($date) and scopedAfterPublishedDate($date)

Again, I 'd be more than happy to take care of those 🙂

Saving avatar does not work with custom storage disk

When defining disk like so:

'public_dev' => [
            'driver' => 'local',
            'root' => public_path('storage'),
            'url' => env('APP_URL').'/storage',
            'visibility' => 'public',
        ],

and:

WINK_STORAGE_DISK=public_dev

leads to broken avatar image. This is in part due to the way ImageUploadsController handles uploading image and returning path.
The following change:

$path =  request()->image->store('/public/wink/images', config('wink.storage_disk'));
return response()->json([
            'url' => \Storage::disk(config('wink.storage_disk'))->url($path)
        ]);

Unfortunately this will lead to saving absolute url for avatar in the database, which is not desirable. One way of dealing with the issue is to make ImageUploadsController save the avatar path in the database. While doing so, it can also delete currently saved avatar from the disk. (Currently it is not deleting old avatar file when new one is uploaded).
Vue component should get avatar's absolute path, but this path should be generated on the server side by using Storage::url() function. It will be also a good idea to make Vue generate default gravatar url if the path for avatar is empty (null), rather than saving default url for gravatar in the database.

Hide password, remember_token from WinkAuthor model

Let me start with: This is the best blog package I have ever come across for Laravel, so a big thank you 🙂

I noticed that that the WinkAuthor model does not include something like

protected $hidden = ['password', 'remember_token'];

Is that on purpose? If not, it would be a good idea to add them in my opinion! I'd be more than happy to contribute.

Logo proposal

Hi,

Thank you for the amazing project, I was just searching something like this to start my personal website and provide a little blog in there.
Wink is the perfect solution for my use case.

I saw in the roadmap that you wanted to design a new logo.
I'm not a designer, I'm the opposit of that but your project has inspired me so i tried to come up with something.

It's my first try with a logo design and even my first try with figma, you are welcome to use/discard/love/hate it.
Feel free to edit it or to tell me what you like and what you don't, or even ignore it.

wink-logo-proposal

Contributing

Can we have a contributing.md on how to contribute to the package?

Forced Redirect to Login view

BlogController.php in app/Http/Controllers

` <?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class BlogController extends Controller
{
//
public function index()
{
$posts = WinkPost::with('tags')
->where('published', true)
->where('publish_date', '<=', now()->toDateTimeString())
->orderBy('publish_date', 'DESC')
->simplePaginate(12);

    return view('blog.index', [
        'posts' => $posts
    ]);
}

}
`

Routes in app/routes/web.php
Route::get('/blog', 'BlogController@index')->name('blog.index');

however, url.com/blog (which I'm making for my homepage) stills redirects instantly to url.com/blog/login ... am I missing a step?

Slug out of title

Would be a good idea to build the slug out of the title. Maybe with str_slug. Especially from an SEO standpoint its nice to have some speakable url and not something like example.com/draft-0bb06fa8-5165-4672-bbfc-030c15008b75.

Re-install command

Currently the install command will not update the views and config if they have changed due to a composer update. Would it be sensible to modify the lines to include the --force parameter, as follows?

$this->callSilent('vendor:publish', ['--tag' => 'wink-assets', '--force']);
$this->callSilent('vendor:publish', ['--tag' => 'wink-config', '--force']);

Alternatively, we could create a re-install command that does this. What does everyone think?

Wink authentication routes are defaulting to my app routes

This is a really awesome little package, learning a ton just source diving it. In the project I first went to test it out, when going to project.test/wink, it redirects to auth.login, and not wink.auth.login. Even though it looks like it should be using the wink pages. I haven't tried this on a fresh laravel app with no scaffolding yet.

when going to project.test/wink/login it does go to the wink login page. Perhaps it's not the intention, but wouldn't the expected behaviour be to redirect to the wink login when attempting to do something in the wink directory?

Cheers and thanks again.

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.