GithubHelp home page GithubHelp logo

lionix-team / seo-manager Goto Github PK

View Code? Open in Web Editor NEW
211.0 12.0 34.0 1.42 MB

Seo Manager Package for Laravel ( with Localization )

PHP 96.64% Blade 3.36%
laravel seo manager seo-manager lionix meta metadata

seo-manager's People

Contributors

axtg avatar karakhanyans avatar mahmoudsaidhaggag avatar robertvanlienden 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

seo-manager's Issues

Param mapping error

Hi, there is an error when using param mapping, I think it does not fetch the models list and expects some params, the dynamic url is /{{slug}}
"message": "Too few arguments to function Illuminate\\Foundation\\Console\\Kernel::__construct(), 0 passed in \vendor\\lionix\\seo-manager\\src\\Traits\\SeoManagerTrait.php on line 116 and exactly 2 expected", "exception": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError", "file": "vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php", "line": 80, "trace": [ { "file": "\vendor\\lionix\\seo-manager\\src\\Traits\\SeoManagerTrait.php", "line": 116, "function": "__construct", "class": "Illuminate\\Foundation\\Console\\Kernel", "type": "->" },

array_merge(): Expected parameter 2 to be an array, null given on seo-manager\src\routes\seo-manager.php:3

i am getting this error while installing package ...?

ErrorException : array_merge(): Expected parameter 2 to be an array, null given

at E:\xampp\htdocs\Personal\brandzshop\vendor\lionix\seo-manager\src\routes\seo-manager.php:3
1| <?php
2| $web = ['web'];

3| $middleware = array_merge($web, config('seo-manager.middleware'));
4| Route::group([
5| 'middleware' => $middleware,
6| 'prefix' => config('seo-manager.route'),
7| 'as' => 'seo-manager.',
8| 'namespace' => 'Lionix\SeoManager'
9| ], function () {

Exception trace:

1 array_merge()
E:\xampp\htdocs\Personal\brandzshop\vendor\lionix\seo-manager\src\routes\seo-manager.php:3

2 require("E:\xampp\htdocs\Personal\brandzshop\vendor\lionix\seo-manager\src\routes\seo-manager.php")
E:\xampp\htdocs\Personal\brandzshop\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:78

Please use the argument -v to see more details.
PS E:\xampp\htdocs\Personal\brandzshop> php artisan vendor:publish --provider="Lionix\SeoManager\SeoManagerServiceProvider" --tag=assets --force
ErrorException : array_merge(): Expected parameter 2 to be an array, null given

at E:\xampp\htdocs\Personal\brandzshop\vendor\lionix\seo-manager\src\routes\seo-manager.php:3
1| <?php
2| $web = ['web'];

3| $middleware = array_merge($web, config('seo-manager.middleware'));
4| Route::group([
5| 'middleware' => $middleware,
6| 'prefix' => config('seo-manager.route'),
7| 'as' => 'seo-manager.',
8| 'namespace' => 'Lionix\SeoManager'
9| ], function () {

Exception trace:

1 array_merge()
E:\xampp\htdocs\Personal\brandzshop\vendor\lionix\seo-manager\src\routes\seo-manager.php:3

2 require("E:\xampp\htdocs\Personal\brandzshop\vendor\lionix\seo-manager\src\routes\seo-manager.php")
E:\xampp\htdocs\Personal\brandzshop\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:78

Please use the argument -v to see more details.

SeoManager object error when seoManager variable is null

When you don't have any data in SeoManger table for the current URI, it throws an error of the object, because it is null, for that you need to just check if it is empty just return a blank string. I don't know how to submit the PR.

to fixed the problem just add this after $metaData = [];
if(empty($seoManager)){
return '';
}

Help in understanding how it works?

Hey. I cannot understand why when I do set params mapping "Find By:" is not shown.
I have a route Route::get('post/{slug}', 'PostController@index')->name('post');,
I have a model for an example called Post.
I see my route in SEO manager, I click on edit, I see my model and all other fields are empty.
Tell me what I'm doing wrong. Thanks for any help :)
image

The parametres I add disappear after a refresh.

It's not working for me at all, I try to add some stuff like title and all, but when I refresh it all disappears, I get a lot of errors on the console too. Can you tell me what's wrong and how to fix it.Thanks.
Screenshot_2021-10-05_02_47_38

Limit auth model

Currently there is a way to link to the Auth model to secure the seo-manager, but it seems limited: everyone that can login into an app, could potentially also change the SEO if they figure out the URL.

So I switched to using

abort_unless(auth()->check() && in_array(auth()->user()->email, config('seo-manager.admins')), 401);

Which means I added an admins array to the configuration file.
Works, but I did therefore remove the Auth reference.

models path error in production env

When I'm in a development environment, the library works perfect. but when I publish the site where I am occupying the library , Therefore the dropdown to select the model doesn't work.

I am presenting the following warnings in developer tools console:

[Vue warn]: Invalid prop: type check failed for prop "options". Expected Array, got Undefined.

found in

---> <VueMultiselect>
       <MappingModal> at packages/lionix/seo-manager/src/vue/components/routes/partials/modals/MappingModal.vue
         <Routes> at packages/lionix/seo-manager/src/vue/components/routes/Routes.vue
           <App> at packages/lionix/seo-manager/src/vue/App.vue
             <Root>
[Vue warn]: Error in getter for watcher "filteredOptions": "TypeError: Cannot read property 'concat' of undefined"

found in

---> <VueMultiselect>
       <MappingModal> at packages/lionix/seo-manager/src/vue/components/routes/partials/modals/MappingModal.vue
         <Routes> at packages/lionix/seo-manager/src/vue/components/routes/Routes.vue
           <App> at packages/lionix/seo-manager/src/vue/App.vue
             <Root>
TypeError: Cannot read property 'concat' of undefined
    at VueComponent.filteredOptions (seo-manager.app.js:22022)
    at Watcher.get (seo-manager.app.js:3671)
    at Watcher.evaluate (seo-manager.app.js:3778)
    at VueComponent.computedGetter [as filteredOptions] (seo-manager.app.js:4036)
    at VueComponent.<anonymous> (seo-manager.app.js:1008)
    at Watcher.get (seo-manager.app.js:3671)
    at Watcher.run (seo-manager.app.js:3748)
    at flushSchedulerQueue (seo-manager.app.js:3510)
    at Array.<anonymous> (seo-manager.app.js:2366)
    at flushCallbacks (seo-manager.app.js:2287)

my seo-manager.php is:

<?php

return [
    /**
     * Database table name where your manager data will be stored
     */
    'database' => [
        'table' => 'seo_manager',
        'locales_table' => 'seo_manager_locales',
        'translates_table' => 'seo_manager_translates'
    ],

    /**
     * Set default locale,
     * It will be added as default locale
     * when locales table migrated
     */
    'locale' => 'en',

    /**
     * Path where your eloquent models are
     * Leave this config empty if you want to look for models in whole project
     */
    'models_path' => '',

    /**
     * Route from which your Dashboard will be available
     */
    'route' => 'admin/seo-manager',

    /**
     * Middleware array for dashboard
     * to prevent unauthorized users visit the manager
     */
    'middleware' => [
         'web',
         'auth',
         'admin',
    ],

    /**
     * Routes which shouldn't be imported to seo manager
     */
    'except_routes' => [
        'seo-manager',
        'admin'
        //
    ],

    /**
     * Columns which shouldn't be used ( in mapping )
     */
    'except_columns' => [
        // "created_at",
        // "updated_at",
    ],

    /**
     * Set this parameter to true
     * if you want to have "$metaData" variable
     * shared between all views in "web" middleware group
     */
    'shared_meta_data' => false
];

These errors or warnings only happen when I am in the production environment

CSRF token issue in Seo-manager

Thanks for your timely replay...
I am getting a error of csrf token mismatch in all the form of seo-manager.
I already spend a day still no chance
Screenshot from 2020-06-04 11-41-24

laravel 7 not working

Hello,
I was trying to use your library in my laravel 7 project but its not supported ...
Can i get any help how i can use this in laravel 7
Screenshot from 2020-06-03 15-47-42

Unable to install

When trying to add this package using this command
composer require lionix/seo-manager

Got these errors
Problem 1 - Conclusion: remove laravel/framework v5.8.8 - Conclusion: don't install laravel/framework v5.8.8 - lionix/seo-manager v1.2.0 requires illuminate/support 5.5.* || 5.6.* || 5.7.* -> satisfiable by illuminate/support[5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9].

Backend fatal error

Backend fatal error: PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function uri() on null in /home/user/project/vendor/lionix/seo-manager/src/Traits/SeoManagerTrait.php:199\nStack trace:\n#0 /home/user/project/vendor/lionix/seo-manager/src/SeoManager.php(24): Lionix\SeoManager\SeoManager->getMetaData('')\n#1

/home/user/project/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Lionix\SeoManager\SeoManager->metaData('')\n#2 /home/user/project/vendor/lionix/seo-manager/src/helpers/helpers.php(8): Illuminate\Support\Facades\Facade::__callStatic('metaData', Array)\n#3

/home/user/project/vendor/lionix/seo-manager/src/SeoManagerServiceProvider.php(82): metaData('')\n#4 [internal function]: Lionix\SeoManager\SeoManagerServiceProvider->Lionix\SeoManager\{closure}('')\n#5

/home/user/project/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(347): call_user_func(Object(Closure), '')\n#6 /home/user in /home/user/project/vendor/lionix/seo-manager/src/Traits/SeoManagerTrait.php on line 199\n, referer: http://www.mywebsite.com

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.