mstdmstd

mstdmstd

Member Since 1 Year Ago

Experience Points 9,250
Experience Level 2

750 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 1
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

03 Mar
2 weeks ago

mstdmstd left a reply on Why Error Subscribing To Specific Mailchimp List

Sorry, I still search for decision. Do you use laravel-newsletter plugin? Or do you use some other tools ?

01 Mar
2 weeks ago

mstdmstd started a new conversation Why Error Subscribing To Specific Mailchimp List

Hello, In my laravel 5.7 app I make subscribe/unsubscribe to lists of mailchimp using https://github.com/spatie/laravel-newsletter It works when ok and all users are suscribed to the current mailchimp list, which is described in .env file

MAILCHIMP_APIKEY = NNNNNNNNNN
MAILCHIMP_LIST_ID = NNNNNNNNNN  # ID of 'subscribers' mailchimp list

But as my site has several group news I try subscribe to mailchimp list with code :

$retData= Newsletter::subscribe($userProfile->email, ['FNAME'=>$userProfile->first_name, 'LNAME'=>$userProfile->last_name], 'subscribers'); // 3rd parameter can be different

where 3rd parameter is mailchimp list name, as I see it on the server as : https://prnt.sc/mqbgnb But I got error :

There is no list named `subscribers`.

Why error? Misconfiguring of of this mailchimp list ? It has some options, I am not sure if some of them is related to my issue ?

In doc I read as :

//Subscribe someone to a specific list by using the third argument:
Newsletter::subscribe('[email protected]', ['firstName'=>'Nanny', 'lastName'=>'Ogg'], 'Name of your list');

How to fix my error ?

Thanks!

23 Feb
3 weeks ago

mstdmstd left a reply on I Have Some Problems Using Maatwebsite/excel

Also I did not find which is valid way of loading data with maatwebsite/excel plugin ?

mstdmstd left a reply on I Have Some Problems Using Maatwebsite/excel

@VNVDV91 - I searched that your example is based on https://github.com/Maatwebsite/Laravel-Excel-Light , which is not supported anymore. Seems bad idea... Any better decision?

mstdmstd left a reply on I Have Some Problems Using Maatwebsite/excel

Do you mean to use this plugin only for data reading and to make the rest functionality on myself ?

mstdmstd started a new conversation I Have Some Problems Using Maatwebsite/excel

Hi, Using in my laravel 5.7 app "maatwebsite/excel": "^3.1", I import csv file with line :

"Mr. John Smith", "3256 Epiphenomenal Avenue, Minneapolis, MN, 55416", "lead value", SS, "box client 1", Individual, "po box # 1", "office fax 123", "[email protected];[email protected];[email protected]", "1234-0987-0986;6543-098-1234","2018-07-18 12:25:29", "2018-07-18 12:25:29"

I managed to add a new client row, with method like :

<?php

class ClientsImport implements ToModel
{
    public function model(array $row)
    {
//        if (empty($row[0]) or empty($row[1]) ) return false;

        ...
        $emails                =  $row[8];
        $emailsArray           = $this->pregSplit('/;/',$emails);
        foreach( $emailsArray as $next_email ) {
            ...
        }

        $phones                =  $row[9];
        return new Client([
            'full_name'        =>  $row[0],
            'address'          =>  $row[1],
            'type'             =>  $row[2],
            'customer_type'    =>  $row[3],
            'box_client_id'    =>  $row[4],
            'account_type'     =>  $row[5],
            'po_box'           =>  $row[6],
            'office_fax'       =>  $row[7],
            'created_at'       =>  $row[10],
            'updated_at'        =>  $row[11],
        ]);
    }

    public function batchSize(): int
    {
        return 100;
    }

    public function chunkSize(): int
    {
        return 100;
    }
}

but I encountered some problems :

  1. As any client has several emails I need to them to related table. I can not do this in this method with emailsArray circle, as I have no client_id of new client(It is not added yet). If there is a way to make it?
  1. My csv files are not of high quality and it can have empty rows and required fields empty I tried to add line like:
        if (empty($row[0]) or empty($row[1]) ) return false;

But got error:

Argument 1 passed to Maatwebsite\Excel\Imports\ModelManager::Maatwebsite\Excel\Imports\{closure}() must be an instance of Illuminate\Database\Eloquent\Model, boolean given, called in /mnt/_work_sdb8/wwwroot/lar/BoxBooking2/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 418

If there is a way to skip such row? I found SkipsFailures trait, but I did not find if and how it can be used here?

  1. At the end import routing I got error:
The Response content must be a string or object implementing __toString(), "object" given.

but all rows were inserted successfully... Why error and how to fix it?

Thanks!

08 Feb
1 month ago

mstdmstd left a reply on Proengsoft/laravel-jsvalidation Failed Working With Using Harvesthq/chosen Library?

Thank youi for your feedback! In the layout of my app resources/views/Backend/layouts/backend.blade.php I added no conflict declaraions just after I included jquery:

    ...
    <script src="{{ asset('js/jquery-3.3.1.min.js') }}"></script>

    <script>
        jQuery.noConflict();
    </script>

    <script src="{{ asset('js/moment.min.js') }}"></script>

    <script src="{{ asset('/js/bootstrap.js') }}"></script>

    <script src="{{ asset('/js/jquery.bootstrap-growl.min.js') }}"></script>
    <script src="{{ asset('/js/jquery-confirm.min.js') }}"></script>
    <script src="{{ asset('js/chosen.jquery.js') }}"></script>

    <script src="{{ asset('js/app/app_funcs.js') }}{{  "?dt=".time()  }}"></script>

</head>

But after that I got error refering my jsvalidation library:

jsvalidation.js? [sm]:241 Uncaught TypeError: $ is not a function
    at jsvalidation.js? [sm]:241

and in browser's console I can see error pointing at my code : https://imgur.com/a/Hc8UJQD Which steps have I to take to fix all errors?

It seems to me that with noConflict option I have to replace all instruction substring "$(" with “jQuery(” ? Is it so ?

noConflict option is behind my expierence...

mstdmstd started a new conversation Https://stackoverflow.com/questions/54554774/proengsoft-laravel-jsvalidation-failed-working-with-using-harvesthq-chosen-libra

Hello In my laravel 5.7/ blade / jQuery v3.3.1 / Bootstrap v4.1.2 app I use https://github.com/proengsoft/laravel-jsvalidation library, with definition in my blade form

    <script src="{{ asset('vendor/jsvalidation/js/jsvalidation.js')}}"></script>
    {!! JsValidator::formRequest('App\Http\Requests\StorageSpaceRequest', '#form_storage_space_edit'); !!}

where StorageSpaceRequest is file in app/Http/Requests subdirectory, It works ok , until I decided to replace select inputs with https://harvesthq.github.io/chosen/ library and my validation rules(usually required) do not work any more.

I init chosen with code

    $(".chosen_select_box").chosen({
        disable_search_threshold: 10,
        no_results_text: "Nothing found!",
    });

Before replacement this good working select input looked like:

<div class="col-xs-12 col-sm-8">
        <select class="form-control editable_field" id="customer_type" name="customer_type" data-placeholder="Choose customer type" aria-describedby="customer_type-error" aria-invalid="true"><option value="" selected=""></option><option value="SS">SS</option><option value="RS">RS</option></select><span id="customer_type-error" class="help-block error-help-block">The customer type field is required.</span>
    </div>
    
After replacement with chosen selector(which do not work) has syntax:
<select class="form-control editable_field chosen_select_box" id="account_type" name="account_type" data-placeholder="Choose account type" style="display: none;"><option value="" selected=""></option><option value="I">Individual</option><option value="B">Business</option></select>   

I suppose that the reason of this error is that when value in chosen selection is selectted, its value is not saved in

 id="account_type" name="account_type"...

I tried a decision to set near with chosen input hidden input and in chosen input to modify id and set onchange event in my select wrapper, like :

{!! $viewFuncs->select('chosen_storage_type_id', $storageTypesArray, isset($storageSpace->storage_type_id) ? $storageSpace->storage_type_id : '', "form-control
 editable_field chosen_select_box", ['onchange'=>"javascript:chosenSelectionOnChange('storage_type_id'); ",'data-placeholder'=>"Choose storage type"] ) !!}
<input type="hidden" id="storage_type_id" name="storage_type_id" value="{{ isset($storageSpace->storage_type_id) ? $storageSpace->storage_type_id : '' }}">

so in chosenSelectionOnChange new value is set to hidden input, but looks like laravel-jsvalidation can not work with hidden inputs... Can be some other decision ?

can it be fixed somehow? I got chosen selection as it has search functionality and seems good working...

Thanks!

07 Feb
1 month ago

mstdmstd started a new conversation Submitting The Form To Show Old Empty Value In Validation Error

Hello In my laravel 5.7/ blade app in my form I make next condition for value property of an text input :

value=" ( !empty(old('field_name')) ? old('field_name') : ( isset($dbRow) ?$dbRow->field_name : '') ) "

but it does not work as I expected : if having entered field value user clear this value and submit the form then oroginal value $dbRow->field_name is show, but not last entered empty value. I need in my blade some key that it is invalid form submittion? Has laravel any? Or some other decision ?

Thanks!

03 Feb
1 month ago

mstdmstd left a reply on Working With Table Prefix In Join Request

Thank you for feedback! Actually I did not know about getTable method. But that is not the issue. Problem is that I have problems when making request with joining table in I have prefixed tables. I gave an example at start of my topic.

Could you please give some examples how looks like similar requests in your apps? When several tables are joined with aliases of tables?

02 Feb
1 month ago

mstdmstd started a new conversation Working With Table Prefix In Join Request

Hello, In my laravel 5.7 app I work with mysql with prefix option filled in config/database.php It seems somewhat complicated when I work with several tables. I make it as :

$votes_tb= with(new Vote)->getTableName() ;
$vote_category_tb= with(new VoteCategory)->getTableName();
$votesCollection = Vote::
leftJoin(  $vote_category_tb . ' as vc ', 'vc.id', '=', $votes_tb . '.vote_category_id')
->select( $votes_tb.".*, vc.name as vote_category_name")
->get();

and I got error :

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'vt_votes.*, vc.name' in 'field list' (SQL: select `vt_votes`.`*, vc`.`name` as `vote_category_name` from `vt_votes` left join `vt_vote_categories` as `vt_vc ` on `vt_vc`.`id` = `vt_votes`.`vote_category_id`)

Looks like that concatenated string in select method was calculated as 1 column?

I tried to wrap select method in raw function,

->select( \DB::raw($votes_tb.".*, vc.name as vote_category_name"))

but got error:

SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'votes' (SQL: select votes.*, vc.name as vote_category_name from `vt_votes` left join `vt_vote_categories` as `vt_vc ` on `vt_vc`.`id` = `vt_votes`.`vote_category_id`)

Vote and VoteCategory models have definition in itself like:

protected $table = 'votes';
...
public function getTableName() : string
{
    return $this->table;
}

and

protected $table = 'vote_categories';
...
public function getTableName() : string
{
    return $this->table;
}

Can you advice some proper way ?

Thanks!

01 Feb
1 month ago

mstdmstd started a new conversation Why Doubled Name In Route Name ?

Hello, In my laravel 5.7 app in routes/web.php I have definitions :

Route::group(['middleware' => ['auth'], 'prefix' => 'admin', 'as' => 'admin.'], function () {
...
    Route::resource('departments', 'Admin\DepartmentsController', [ 'as' => 'departments', 'except' => [] ] )->middleware('WorkTextString');
    Route::get( 'get-departments-dt-listing', [ 'uses' => 'Admin\[email protected]_departments_dt_listing' ] );

Running command

php artisan route:list

I see : index is defined with name admin.departments.departments.index :

|        | GET|HEAD  | admin/departments                                    | admin.departments.departments.index                   | App\Http\Controllers\Admin\[email protected]                                     | web,auth,WorkTextString |

and this name I have to use calling redirect()->route( method.

Why I have 2 departments. in name and how to remove 1 of it?

Thanks!

30 Jan
1 month ago

mstdmstd left a reply on About Payment On Cloud.digitalocean.com

Yes, on support page I found how to create a ticket and twice last days I sent new tickets and after that my databases were not deleted anymore. But in feedback emails from Digital Ocean there were answers to my questions - they were too common... This situation is annoying and surprizing. I think last year I did not have some problems if I did not pay for 2-3 weeks.

  1. Did some rules were changed and I miss?

  2. If there is a way in beginning of the month to pay till the end of the current month?

26 Jan
1 month ago

mstdmstd left a reply on I Got Error Setting ->change Method In Miigration

I still search for a decision. Searching in net I found using of ->default( in migration, but trying to make like:

            $table->timestamp('created_at')->default( `CURRENT_TIMESTAMP`)->change();

I got message :

sh: 1: CURRENT_TIMESTAMP: not found

and no modifications in db

I tried to make like

            $table->timestamp('created_at')->default( "`CURRENT_TIMESTAMP`")->change();

I got syntax error, like :

ALTER TABLE warehouses CHANGE created_at created_at TIMESTAMP NULL DEFAULT 'CURRENT_TIMESTAMP';

as CURRENT_TIMESTAMP must be without any brackets. Which is the valid way?

23 Jan
1 month ago

mstdmstd left a reply on About Payment On Cloud.digitalocean.com

and again my demo database was deleted and I do not know how to get in touch with supoort ofthem. Have they some ?

Where is support page under https://cloud.digitalocean.com ?

Does anybody have similar problems with digitalocean.com ?

mstdmstd started a new conversation About Payment On Cloud.digitalocean.com

Hello, who use cloud.digitalocean.com ? I have 1 droplet for my demo applications and I wonder if there is a way to pay $5 till the end of the current month. Or how in the beginning of the month to pay till the end of the month? I did not find such possibility inside of cloud.digitalocean.com. The reason is that last days I twice found that my 2 databases were deleted and inside of my phpmyadmin I found https://imgur.com/a/Wa7o6FD

  1. I payed my owe inside cloud.digitalocean.com on billing page and in my youhoo account I about 20 hours ago found next email https://imgur.com/a/61StGzn But why december is here. I am working in Jan 2019

  2. On my billing page of cloud.digitalocean.com I see : https://imgur.com/a/VqCWPGc and Billing history : https://imgur.com/a/RoXVOxC

  3. very strange that about 2 hours ago I found that my databases were deleted and PLEASE_READ_ME_FXF database with error message I do not really need to restore my database but why they were deleted after my payment?

  4. Where there is official support of cloud.digitalocean.com ? For whom to send such emails?

Thanks!

22 Jan
1 month ago

mstdmstd left a reply on Why In Bootstrap 4.1 Left Aside Menu Icon To Dropdown Items Is Not On Valid Place?

I checked my html generated code under https://validator.w3.org and got error :

Error: Bad value  false  for attribute aria-expanded on element a.
From line 96, column 4; to line 96, column 112

ive;">↩         <a href="#manage_storage_submenu" data-toggle=" collapse " aria-expanded=" false " class=" dropdown-toggle "><span 

I think that the error is called by space in aria-expanded= definition, as I had blade source :

            <a href="#manage_storage_submenu" data-toggle="@if($manage_storage) dropdown @else collapse @endif" aria-expanded="@if($manage_storage) true @else false @endif" class="@if(!$manage_storage) dropdown-toggle @endif"><span style="text-decoration: underline">Manage Storage</span></a>

But if I remove space in aria-expanded= definition I got blade syntax error. Could it raise my problems? Which is the valid way here?

mstdmstd left a reply on Why In Bootstrap 4.1 Left Aside Menu Icon To Dropdown Items Is Not On Valid Place?

@BOBBYBOUWMANN - Thank you, with setting

<li style="position: relative;">

Icon is on its proper place, but “Manage Storage” is not clickable. I tried and did not find any difference with “Manage Users” menu item, which has no php code in itself and works ok. What is wrong?

21 Jan
1 month ago

mstdmstd started a new conversation Why In Bootstrap 4.1 Left Aside Menu Icon To Dropdown Items Is Not On Valid Place?

Hello. I have a left aside menu with submenus in laravel 5.7 / blade/ Bootstrap 4.1 app and if some element of submenu is opened I want to keep open parent menu item. I tried to keep it ny current control name as :

    <?php $manage_storage= ($current_controller_name == 'ClientsController'); ?>

    <div class="sidebar-header">
        @if(isset($app_name))<h3>{{ $app_name }}</h3>@endif
    </div>

    <ul class="list-unstyled components">

        <li>
            <a href="#users_submenu" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">Manage Users</a>
            <ul class="collapse list-unstyled" id="users_submenu">
                <li>
                    <a href="#">Manage Departments</a>
                </li>
                <li>
                    <a href="#">Manage Users</a>
                </li>
            </ul>
        </li>


        <li>
            <a href="#manage_storage_submenu" data-toggle="@if($manage_storage) dropdown @else collapse @endif" aria-expanded="@if($manage_storage) true @else false @endif" class="@if($manage_storage) @else dropdown-toggle @endif">Manage Storage</a>
            <ul class="collapse list-unstyled @if($manage_storage) show @endif" id="manage_storage_submenu">
                <li class=" @if($current_controller_name == 'ClientsController') active @endif ">
                    <a href="{{ url('admin/clients') }}">Manage Clients</a>
                </li>
                <li>
                    <a href="#">Manage Locations</a>
                </li>

                <li class=" @if($current_controller_name == 'WarehousesController') active @endif ">
                    <a href="{{ url('admin/warehouses') }}" >Manage Warehouses</a>
                </li>

            </ul>
        </li>

So if clients page is opened, then Manage Storage menu must be opened.

But it does not work as I expected: Please, open : http://demo2.nilov-sergey-demo-apps.tk/admin/warehouses/2/edit It is under credentials [email protected] 111111

look at http://demo2.nilov-sergey-demo-apps.tk/admin/dashboard and http://demo2.nilov-sergey-demo-apps.tk/admin/clients pages for the first page (when Manage Storage is not opened) icon to dropdown submenu items is in other place of the page : https://imgur.com/a/aXG2Zom on the second page( when Manage Storage is opened ) I do not see the icon to dropdown submenu items.

How to fix it ?

Thanks!

mstdmstd left a reply on How To Escase A String In Laravel-datatables-oracle Table?

Thank you for you feedback, but your decision does not work for me : i still get error of unterminated string. I found other decision :

    foreach( $pageContentsCollection as $next_key=> $nextPageContent ) {
        $pageContentsCollection[$next_key]->slashed_title= addslashes($nextPageContent->title);
    }

And I use slashed_title field in editColumn column definition. It works for me...

mstdmstd started a new conversation Summary Of Problem Or Feature Request

Hello,

In my laravel 5.7 app I use laravel-datatables-oracle": "^8.7" and defining js function on confirmation of deletion I call ja function like

            ->editColumn('action_delete',
                '<a href="#" onclick="javascript:backendPageContent.deletePageContent({{$id}},\'{{$title}}\')"><i class="fa fa-remove a_link"></i></a>')
            ->rawColumns(['action', 'action_delete'])

It works ok, until in $title happen “'” char and it raise error.

Usually in my laravel/jquery apps I use method json_encode in such cases, but here i tried like

            ->editColumn('action_delete',
//                '<a href="#" onclick="javascript:backendPageContent.deletePageContent({{$id}},json_encode(\'{{$title}}\'))"><i class="fa fa-remove a_link"></i></a>')
                '<a href="#" onclick="javascript:backendPageContent.deletePageContent({{$id}},\'{{  json_encode($title)  }}\'))"><i class="fa fa-remove a_link"></i></a>')
            ->rawColumns(['action', 'action_delete'])

But in both cases I failed. Which is right way ?

Thanks!

20 Jan
1 month ago

mstdmstd left a reply on I Got Error Setting ->change Method In Miigration

I do not need to create 2 fields created_at and updated_at. I need to modify existing created_at with default value.

19 Jan
1 month ago

mstdmstd started a new conversation I Got Error Setting ->change Method In Miigration

Hello, In laravel 5.7/mysql 5 app I want to set default value to timestamp field(it was not set on creation):

          $table->timestamp('created_at')->useCurrent()->change();

But I got error :

 Unknown column type "timestamp" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapping information.

  at /mnt/_work_sdb8/wwwroot/lar/BoxBooking2/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:267
    263|      * @return \Doctrine\DBAL\DBALException
    264|      */
    265|     public static function unknownColumnType($name)
    266|     {                                                                                                                                                                                                         
  > 267|         return new self('Unknown column type "' . $name . '" requested. Any Doctrine type that you use has ' .                                                                                                
    268|             'to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the ' .                                                                                                    
    269|             'known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database ' .                                                                                              
    270|             'introspection then you might have forgotten to register all database types for a Doctrine Type. Use ' .                                                                                          
    271|             'AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement ' .                                                                                                           

Googling I found that doctrine/dbal musdt be installed. I have it installed and my composer.json :

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.1.3",
        "doctrine/dbal": "^2.9",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.7.*",
        "laravel/tinker": "^1.0",
        "marktopper/doctrine-dbal-timestamp-type": "^1.0",
        "mews/purifier": "^2.1",
        "proengsoft/laravel-jsvalidation": ">2.2.0",
        "yajra/laravel-datatables-oracle": "~8.0"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.0"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

and anyway I got error and

composer install 

command Googling I found that I need also to install marktopper/doctrine-dbal-timestamp-type https://github.com/art-institute-of-chicago/data-aggregator/commit/581f4f318468681c71c62103280daedc67bbe118 I installed it and I do not have error running migration, but created_at default timestamp is NOT defined, so added new row has null in created_at.

How to fix it ?

Thanks!

16 Jan
2 months ago

mstdmstd left a reply on AJAX Lazy Loading Listing For Laravel/jquery Project

If there is some other JS bootstrap campatible lib with infinite-scroll functionality for responsive table?

mstdmstd left a reply on AJAX Lazy Loading Listing For Laravel/jquery Project

I tried to make infinite scrolling functionality with https://github.com/metafizzy/infinite-scroll plugin in my ( jquery-3.3.1 / Infinite Scroll PACKAGED v3.0.5 ) application I implemented infinite-scroll functionality looking at demo https://codepen.io/desandro/pen/WOjqNM I search if there is a way to implement infinite-scroll with data in bootstrap responsive table? That must be infinite scrolling data of rows in backend part of application. I tried to make like :

                <div class="table-responsive">
                    <table class="table table-bordered table-striped text-primary">
                        <thead>
                        <tr>
                            <th>Id</th>
                            <th>Name</th>
                            <th>Location</th>
                            <th>Level count</th>
                            <th>Created At</th>
                            <th>Updated At</th>
                            <th></th>
                            <th></th>
                        </tr>
                        </thead>
                    </table>



                    <tbody id="infinite_scroll_container">
                    <tr class="warehouses-listing-append-block">
                        <td>Id</td>
                        <td>Name</td>
                        <td>Location</td>
                        <td>Level count</td>
                        <td>Created At</td>
                        <td>Updated At</td>
                        <td></td>
                        <td></td>
                    </tr>
                    </tbody>


                    <div class="warehouses-listing-load-status-block">
                        <div class="loader-ellips infinite-scroll-request">
                            <span class="loader-ellips__dot"></span>
                            <span class="loader-ellips__dot"></span>
                            <span class="loader-ellips__dot"></span>
                            <span class="loader-ellips__dot"></span>
                        </div>
                        <p class="infinite-scroll-last">End of content</p>
                        <p class="infinite-scroll-error">No more pages to load</p>
                    </div>


                </div>

            </div>

In js init function with code :

    var infScroll = new InfiniteScroll( '#infinite_scroll_container', {
        path: function() {
            return '/admin/get-warehouses-listing/' + ( ( this.loadCount + 1 ) * this_rows_per_scroll_step );
        },
        append: '.warehouses-listing-append-block',
        status: '.warehouses-listing-load-status-block',
    )

But I got JS error in console :

infinite-scroll.pkgd.min.js:12 Bad element for InfiniteScroll: #infinite_scroll_container
  1. If there is a way to use table here?
  2. Can similar functionality of table (horizontal scrolling with header row ) be implemented with other tag, not table ?

Thanks!

14 Jan
2 months ago

mstdmstd left a reply on AJAX Lazy Loading Listing For Laravel/jquery Project

Yes, how could it be implemented with laravel 5.7/jquery 3 / blade?

mstdmstd started a new conversation AJAX Lazy Loading Listing For Laravel/jquery Project

Hello! With new task description my client wrote

 AJAX lazy loading so we don’t have huge number of pagination based pages but we should show always show count of the number of results

I suppose that is like scrolling on youtube ? When there is no pagination bar and scrolling down more data rows are retrieved? It was supposed to be laravel 5.7/jquery 3 project with using of https://datatables.yajrabox.com/ for listings. But seems this lib has no such functionality. Are there some compatible libraries with such functionality ?

Thanks !

13 Jan
2 months ago

mstdmstd left a reply on How To Add Npm Into Docker Project Based On Apache?

Thank you for your feedback! I modified my web/Dockerfile.yml file as :

FROM php:7.2-apache

RUN apt-get update && \
    apt-get install -y \
    libfreetype6-dev \
    libwebp-dev \
    libjpeg62-turbo-dev \
    libpng-dev \
    nano \
    git-core \
    curl \
    build-essential \
    openssl \
    libssl-dev \
    libgmp-dev \
    libldap2-dev \
    netcat \
    sqlite3 \
    libsqlite3-dev \
     && git clone https://github.com/nodejs/node.git \
     && cd node \
     && ./configure \
     && make \
     && sudo make install \
    docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-webp-dir=/usr/include/  --with-jpeg-dir=/usr/include/ && \
    docker-php-ext-install gd pdo pdo_mysql pdo_sqlite zip gmp bcmath pcntl ldap sysvmsg exif \
&& a2enmod rewrite

COPY virtualhost.conf /etc/apache2/sites-enabled/000-default.conf

and running

docker-compose up -d --build

command after long output I got error :

Processing triggers for libc-bin (2.24-11+deb9u3) ...
Cloning into 'node'...
Checking out files: 100% (31121/31121), done.
./configure: 4: exec: python: not found
ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get update &&     apt-get install -y     libfreetype6-dev     libwebp-dev     libjpeg62-turbo-dev     libpng-dev     nano     git-core     curl     build-essential     openssl     libssl-dev     libgmp-dev     libldap2-dev     netcat     sqlite3     libsqlite3-dev      && git clone https://github.com/nodejs/node.git      && cd node      && ./configure      && make      && sudo make install     docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-webp-dir=/usr/include/  --with-jpeg-dir=/usr/include/ &&     docker-php-ext-install gd pdo pdo_mysql pdo_sqlite zip gmp bcmath pcntl ldap sysvmsg exif && a2enmod rewrite' returned a non-zero code: 127

Have I to add some package with python ? Which ?

12 Jan
2 months ago

mstdmstd started a new conversation How To Add Npm Into Docker Project Based On Apache?

Hello,

How correctly add npm / nodejs to my php 7.2 / laravel 5 docker project based on php:7.2-apache ?

In my web/Dockerfile.yml I added line with " nodejs ":

FROM php:7.2-apache

RUN apt-get update && \
    apt-get install -y \
    libfreetype6-dev \
    libwebp-dev \
    libjpeg62-turbo-dev \
    libpng-dev \
    nano \
    libgmp-dev \
    libldap2-dev \
    netcat \
    sqlite3 \
    nodejs \
    git \
    libsqlite3-dev && \
    docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-webp-dir=/usr/include/  --with-jpeg-dir=/usr/include/ && \
    docker-php-ext-install gd pdo pdo_mysql pdo_sqlite zip gmp bcmath pcntl ldap sysvmsg exif \
&& a2enmod rewrite

and running command :

docker-compose up -d --build

I did not get any errors during installation and I entered the bash, but failed testing

$ docker-compose exec web bash
[email protected]:/var/www/html# npm -v
bash: npm: command not found
[email protected]:/var/www/html# node -v
bash: node: command not found

I tried to add npm in the listing above, but got error that no candidate found...

Thanks !

09 Jan
2 months ago

mstdmstd started a new conversation How To Escase Astring In Laravel-datatables-oracle Table?

Hello,

In my laravel 5.7 app I use laravel-datatables-oracle": "^8.7" and defining js function on confirmation of deletion I call ja function like

            ->editColumn('action_delete',
                '<a href="#" onclick="javascript:backendPageContent.deletePageContent({{$id}},\'{{$title}}\')"><i class="fa fa-remove a_link"></i></a>')
            ->rawColumns(['action', 'action_delete'])

It works ok, until in $title happen “'” char and it raise error.

Usually in my laravel/jquery apps I use method json_encode in such cases, but here i tried like

            ->editColumn('action_delete',
//                '<a href="#" onclick="javascript:backendPageContent.deletePageContent({{$id}},json_encode(\'{{$title}}\'))"><i class="fa fa-remove a_link"></i></a>')
                '<a href="#" onclick="javascript:backendPageContent.deletePageContent({{$id}},\'{{  json_encode($title)  }}\'))"><i class="fa fa-remove a_link"></i></a>')
            ->rawColumns(['action', 'action_delete'])

But in both cases I failed. Which is right way ?

Thanks!

06 Jan
2 months ago

mstdmstd left a reply on Syntax Error Addin DejaVu Sans Font Fromt Using Html2pdf

I try to add some additive fonts In the link abobe there is method mentioned

$fontname = $pdf->addTTFfont(‘/path-to-font/DejaVuSans.ttf’, ‘TrueTypeUnicode’, “, 32);

but it is not accessible for Spipu\Html2Pdf class Searching in the app I found file vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php with class TCPDF_FONTS defintion with method

    /**
     * Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable).
     * @param $fontfile (string) Font file (full path).
     * @param $fonttype (string) Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional.
     * @param $enc (string) Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.
     * @param $flags (int) Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font.
     * @param $outpath (string) Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
     * @param $platid (int) Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1).
     * @param $encid (int) Encoding ID for CMAP table to extract (when building a Unicode font for Windows this value should be 1, for Macintosh should be 0). When Platform ID is 3, legal values for Encoding ID are: 0=Symbol, 1=Unicode, 2=ShiftJIS, 3=PRC, 4=Big5, 5=Wansung, 6=Johab, 7=Reserved, 8=Reserved, 9=Reserved, 10=UCS-4.
     * @param $addcbbox (boolean) If true includes the character bounding box information on the php font file.
     * @param $link (boolean) If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts.
     * @return (string) TCPDF font name or boolean false in case of error.
     * @author Nicola Asuni
     * @since 5.9.123 (2010-09-30)
     * @public static
     */
    public static function addTTFfont($fontfile, $fonttype='', $enc='', $flags=32, $outpath='', $platid=3, $encid=1, $addcbbox=false, $link=false) {
    ...

Can it be helpfull, but how to call it from Spipu\Html2Pdf class?

I can use fonts like Courier, Helvetica, Times after installiong them in my kubuntu OS, but I wpould like to extend these fonts with native linux fonts, like “themify”, “DejaVu Sans”, which are installed in my system and in my app. But I have strange errors as mentioned above and trying to use

        $html2pdf->addFont( 'themify', '', public_path('/fonts/themify/themify.ttf')  );

I have strange error

syntax error, unexpected '@'

?

04 Jan
2 months ago

mstdmstd started a new conversation Syntax Error Addin DejaVu Sans Font Fromt Using Html2pdf

Hello, Installing laravel 5.7 I convirt html code into pdf using "spipu/html2pdf": "^5.2" and got error :

syntax error, unexpected '>=' (T_IS_GREATER_OR_EQUAL), expecting end of file

when I try to attach DejaVu Sans font to my app. I use this font in html in source code, like

style="font-family: 'DejaVu Sans')

My control :

        $pdf_content= !empty($requestData['pdf_content']) ? $requestData['pdf_content'] : '';
        $pdf_filename= !empty($requestData['pdf_filename']) ? $requestData['pdf_filename'] : '';
        $page_orientation = 'P';/* P or Portrait (default) L or Landscape */
        $page_format = 'A4'; // A4  A6

        $page_lang = 'en';
        $page_unicode = true;
        $page_encoding = 'UTF-8';
        $page_margins = array(5, 5, 5, 8);
        $page_pdfa = false;

        $html2pdf = new Html2Pdf(  $page_orientation, $page_format, $page_lang, $page_unicode, $page_encoding, $page_margins, $page_pdfa  );


        $html2pdf->addFont(  'DejaVu Sans', '', public_path('/fonts/DejaVuSans/DejaVuSans-Bold.ttf')  );


        $html2pdf->addFont(  'courier'  );
        $html2pdf->addFont(  'helvetica'  );
        $html2pdf->addFont(  'symbol'  );
        $html2pdf->addFont(  'times'  );
        $html2pdf->writeHTML( $pdf_content );

        $html2pdf->output($pdf_filename, 'D');

But that is not syntax error of my application anyway, if to comment line
        $html2pdf->addFont(  'DejaVu Sans', '', public_path('/fonts/DejaVuSans/DejaVuSans-Bold.ttf')  );

there is no error and pdf file is generated, but area with DejaVu Sans font is black, I suppose that is because the DejaVu Sans font is not found in the app. That how error looks on my side : https://imgur.com/a/vuGWUPp

Why error and how to fix it ?

Thanks!

03 Jan
2 months ago

mstdmstd left a reply on How To Set Url Of Laravel App Under Docker Without “public”?

I have found valid decision for me at https://github.com/petecoop/docker-laravel I looked that at end of web/Dockerfile.yml there was a line :

COPY virtualhost.conf /etc/apache2/sites-enabled/000-default.conf

and in this 000-default.conf “/public” path and other parameters were written.

02 Jan
2 months ago

mstdmstd left a reply on Is Bootstrap-multiselect Plugin Is Compatible With Bootstrap 4.1 ?

Looks like bootstrap 4 support was added to this plugin https://imgur.com/a/YDQVq76 But which is correct way to install this plugin with bootstrap 4 support to my app? I know how git/branch works, but that is samewhat complicated.

I suppose that I can run in console

composer require davidstutz/bootstrap-multiselect

and after that manually to apply changes in file on printscreen above. Is it valid way ?

mstdmstd started a new conversation How To Set Url Of Laravel App Under Docker Without “public”?

Hello, Installing laravel 5.7 app under docker(based on php:7.2-apache ) I need to use "/public" in my url to run my app, so root url of my app is

http://127.0.0.1:8081/public

I modified .env of my laravel app as

APP_URL=http://127.0.0.1:8081/public/

But it did not help, as I browser I got image url :

http://127.0.0.1:8081/storage/mysites/-mysite-16/Babe_ver1.jpg?dt=1546059015

which way is invalid, as valid way must be :

http://127.0.0.1:8081/public/storage/mysites/-mysite-16/Babe_ver1.jpg?dt=1546059015

The similar way with ajax requests, as I got invalid ways :

http://127.0.0.1:8081/admin/get_activity_log_rows/1

But valid must be

http://127.0.0.1:8081/public/admin/get_activity_log_rows/1

In my docker-compose.yml :

version: '3.1'

services:

    web:

        build:
            context: ./web
            dockerfile: Dockerfile.yml

        environment:
            - APACHE_RUN_USER=www-data
        volumes:
            - ${APP_PATH_HOST}:${APP_PTH_CONTAINER}
        ports:
            - 8081:80
        working_dir: ${APP_PTH_CONTAINER}


    composer:
        image: composer:1.8
        volumes:
            - ${APP_PATH_HOST}:${APP_PTH_CONTAINER}
        working_dir: ${APP_PTH_CONTAINER}
        command: composer install

and in .env of docker project :

# PATHS
DB_PATH_HOST=./databases
APP_PATH_HOST=./Mysites
APP_PTH_CONTAINER=/var/www/html/


How to set root url  of my site with “/public” ?


Thanks!
30 Dec
2 months ago

mstdmstd started a new conversation Does Laravel-websockets Need Pusher Parameters ?

Hello,

I try to install in my larabel 5 app https://docs.beyondco.de/laravel-websockets/

and I stuck on a question if using this plugin I need to fill in my .env PUSHER_APP_ID, PUSHER_APP_KEY, PUSHER_APP_SECRET parameters?

Reading here https://docs.beyondco.de/laravel-websockets/1.0/basic-usage/pusher.html I found that it is replacement of pusher?

If there is a way to use this plugin without pusher parameters please give a link how to make it ?

Thanks!

28 Dec
2 months ago

mstdmstd left a reply on Under Docker Error Call To Undefined Function Intervention\Image\Gd\imagecreatefromjpeg

@OHFFS - Thanks! But next I got error :

Unsupported image type. GD/PHP installation does not support WebP format.

But I do not use any WebP files in my app. Which extentions these files mut be? Or how to fix this error?

mstdmstd left a reply on Under Docker Error Call To Undefined Function Intervention\Image\Gd\imagecreatefromjpeg

Thank you for your feedback! I tried to remade web/Dockerfile.yml according to your links and I got file :

FROM php:7.2-apache

RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        nano \
        libjpeg62-turbo-dev \
        libpng-dev \
        libmcrypt-dev \
        libicu-dev \
        libxml2-dev \
    && docker-php-ext-install -j$(nproc) iconv \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd

RUN docker-php-ext-install \
    pdo_mysql \
    && a2enmod \
    rewrite
RUN docker-php-ext-install gd

and running command :

docker-compose up -d --build

I got warning(I suppose it is not critical)

warning: gd (gd.so) is already loaded!

I checked logs and found no errors :

docker logs --tail=20  votes_docker_web_1
docker logs --tail=20  votes_docker_db_1
docker logs --tail=20  votes_docker_phpmyadmin_1
docker logs --tail=20  votes_docker_composer_1   

I check modules installed in the box and see gd installed:

# php -m
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

But anyway opening the project in browser I got error:

Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg()

Did I miss something in commands of web/Dockerfile.yml ?

mstdmstd started a new conversation Under Docker Error Call To Undefined Function Intervention\Image\Gd\imagecreatefromjpeg

Hello, I try to install my laravel 5.7.19 application under docker and running some pages I got error:

Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg()

I include jpeg files in web/Dockerfile.yml:

FROM php:7.2-apache

RUN apt-get update -y && apt-get install -y libpng-dev libjpeg-dev libxpm-dev libfreetype6-dev  nano  \
    && docker-php-ext-configure gd \
    --with-freetype-dir=/usr/include/ \
    --with-jpeg-dir=/usr/include/ \
    --with-xpm-dir=/usr/include/ \
    --with-vpx-dir=/usr/include/

RUN docker-php-ext-install \
    pdo_mysql \
    && a2enmod \
    rewrite


RUN docker-php-ext-install gd

But I have the same error anyway. Is path “/usr/include/” valid and how to check it ?

My working OS is Kubuntu 18...

Thanks!

25 Dec
2 months ago

mstdmstd started a new conversation How To Check Correctly If Websocket Is Running

Hello,

In my laravel 5.7 app I use

     "beyondcode/laravel-websockets": "^1.0",

and in resources/js/app.js file I define :

import Echo from 'laravel-echo'  // If to comment // require('./bootstrap'); line above then we need to install echo here
window.Pusher = require('pusher-js');
console.log("check -0 Echo::")
console.log( Echo )

window.Echo = new Echo({
    broadcaster: 'pusher',
    encrypted : false,  // TO FIX
    key: process.env.MIX_PUSHER_APP_KEY,
    cluster: process.env.MIX_PUSHER_APP_CLUSTER,
    wsHost : window.location.hostname,
    wsPort : 6001,
    disableStats : true
});

and in when I open page, which uses socket I attach file public/js/cardsBS41Frontend/user_chat.js with code like:

    Echo.join('make_votes_chat')
        .here((activeUsers) => {
            console.log("here  activeUsers::")
            console.log( activeUsers )
            this_activeUsers= activeUsers
            $("#span_show_chat_members_count").html(activeUsers.length)
        })
        .joining((user) => {
            console.log("joining  user::")
            console.log(user.id + ' = ' + user.username);
            popupAlert( user.username + " joined this chat !", 'info')
        })
        ...

My question is how to check correctly if websocket is running now and if it is not running to run it ?

I suppose that I can to check if Echo var if not undefined ant to run command using ajax request and

Artisan::call("php artisan websockets:serve");

command, but if that is good way/tools/plugins for this purpose?

Thanks!

mstdmstd left a reply on Setting Https Secure Certificates On Laravel 5

Thank you for feedbacks! I suppose to make cron task to refresh letsencypt certificates is not complicated. Are there any other ssl certificates accessible, maybe with more more 89 days ?

 Did you open port 443 on your server?

I missed what is the issue with 443 port ?

23 Dec
2 months ago

mstdmstd left a reply on How To Imoplement Laravel-widgets With Additive Ajax Requests

Searching In net I found this https://github.com/nWidart/laravel-modules plugin, which seems good for me, when I need to use the same block of code in different apps. Did anybody use it?

mstdmstd left a reply on Setting Https Secure Certificates On Laravel 5

Thank you, I installed certificates and got message:

Your cert will expire on 2019-03-20. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"

The period of certificates seems not too long. What expects my cite at 2019-03-20 and after? Which steps have I to take not to have problems with certificates period expired ?

21 Dec
2 months ago

mstdmstd started a new conversation Setting Https Secure Certificates On Laravel 5

Hello, I set https secure certificates on my laravel 5.7 app as it was written in https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04 article The only thing that I had to modify was in .env to modify

APP_URL=https://mysite

and callback urls for socialite plugin. I do not have any more url pointing to my site...

If there is something more I have to pay attention moving to https?

Thanks!

17 Dec
3 months ago

mstdmstd started a new conversation How To Imoplement Laravel-widgets With Additive Ajax Requests

Hello, I use https://github.com/arrilot/laravel-widgets in my Laravel 5.7 app it is ok for my blocks of code, but now I need to implement some additive ajax requests related with logged user and I wonder how better to make control actions? In the doc there is next:

class RecentNews extends AbstractWidget
{
    /**
     * The configuration array.
     *
     * @var array
     */
    protected $config = [];

    /**
     * Treat this method as a controller action.
     * Return view() or other content to display.
     */
    public function run()
    {
        //

But no additive control action described... I suppose to make 1 more class file with methods implemented and trigger its methods in profile control, but is there is a better way?

Thanks!

13 Dec
3 months ago

mstdmstd started a new conversation How To Auth To The System Without New Row In Users

hello, I have a system "tymon/jwt-auth" is used with OTP and twillio.

But we also need to create new person (shop) who has to create itself and login to the system. But we create 1 row in shop only, not users. If there is a way to auth to the system without annd new row in users, if yes how? composer.json:

 {
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.7.*",
        "laravel/tinker": "^1.0",
        "tymon/jwt-auth": "^1.0.0"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.0"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

Thanks!

11 Dec
3 months ago

mstdmstd left a reply on Please, Look At Design Of My Site

Searching in net I found this template https://blackrockdigital.github.io/startbootstrap-sb-admin/ It is based on Bootstrap v4.1.3 How do you think is it good template to start with ?

mstdmstd started a new conversation Is It Possible To Change Value In _variables.scss File Depending On Request Parameters?

Hello! If there is a way in laravel 5.7 app /blade/scssproject to change value in resources/sass/_variables.scss file depending on request parameters?

That could be usefull for debugging. Something like that:

$debug_mode: <?php echo (  !empty( $_REQUEST['is_debug'] ? 1: ''  ); ?>;

But that raise compliation errors.

That syntax

$debug_mode: "<?php echo (  !empty( $_REQUEST['is_debug'] ? 1: ''  ); ?>";

does not raise compliation errors

But it does not work as I expected in other scss file, like:

.block_container {
  min-width: 300px !important;
  padding-right: 5px;
  padding-left: 5px;
  @if ($debug_mode  == 1) {
    background-color: yellow;
    border: 2px dotted blue;
  }
}

Can it be done in some other way ?

Thanks!

10 Dec
3 months ago

mstdmstd started a new conversation Has Laravel-jsvalidation Client Events ?

Hello, I use https://github.com/proengsoft/laravel-jsvalidation plugin in my laravel 5.7 app. Has this plugin success/failure validation events on client side? I want to use it in big form to show popup dialog when user clicks on submit button and depending on validation results popup message must be different ...

Thanks!

06 Dec
3 months ago

mstdmstd left a reply on Please, Look At Design Of My Site

Thank you for your feedback!

  1. As I see https://blackrockdigital.github.io/startbootstrap-sb-admin-2/pages/index.html is based on Bootstrap v3.3.7, that seems not good for new projects. I have expierence in remaking from Bootstrap v3.3.7 to Bootstrap v4.1. That was some issue for me. Can you advice similar backend template but based on Bootstrap v4.1?