SolomonRei

SolomonRei

Member Since 5 Months Ago

Experience Points
200
Total
Experience

4,800 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
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 1
200 XP
Jul
30
2 months ago
Activity icon

Started a new Conversation React Issue (css-loader)

Goodnight! I've never implemented react in laravel. I've got any issues and don't know how resolve them.

App.js

require('./bootstrap');
import './App.css';
import React from 'react';
import { Button } from 'react-bootstrap';
import '../sass/style.scss';
import Footer from './components/Footer/';
import Header from './components/Header';
import Content from './components/Pages/main/Content';
import AboutPage from './components/Pages/About/';
import PartnersPage from './components/Pages/Partners/';
import VacantionPage from './components/Pages/Vacantion/';
import { BrowserRouter, Route } from 'react-router-dom';
import ListingsPage from './components/Pages/Listings';
import ListingPage from './components/Pages/Listing';
import newPage from './components/Pages/newPage';
import RealtyPage from './components/Pages/Realty/';

App.sass

// Fonts
@import url('https://fonts.googleapis.com/css?family=Nunito');

// Variables
@import 'variables';

// Bootstrap
@import '~bootstrap/scss/bootstrap';

webpack.mix.js

const mix = require('laravel-mix');
mix.react('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

Error

ERROR in ./resources/js/components/Pages/main/Services/style.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src??ref--7-2!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./resources/js/components/Pages/main/Services/style.scss)

Module build failed (from ./node_modules/css-loader/dist/cjs.js):
Error: Can't resolve '/img/about/background.svg' in 
'W:\domains\imobil\resources\js\components\Pages\main\Services'

Error: Can't resolve '/img/about/background.svg' in 
'W:\domains\imobil\resources\js\components\Pages\main\Services'
at W:\domains\imobil\node_modules\enhanced-resolve\lib\Resolver.js:209:21
at W:\domains\imobil\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (W:\domains\imobil\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)
at W:\domains\imobil\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:44:7
at W:\domains\imobil\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (W:\domains\imobil\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)
at W:\domains\imobil\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (W:\domains\imobil\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:27:1)
at W:\domains\imobil\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:67:43
at W:\domains\imobil\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (W:\domains\imobil\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
at W:\domains\imobil\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (W:\domains\imobil\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
at W:\domains\imobil\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (W:\domains\imobil\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
at W:\domains\imobil\node_modules\enhanced-resolve\lib\Resolver.js:285:5
at eval (eval at create (W:\domains\imobil\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)
at W:\domains\imobil\node_modules\enhanced-resolve\lib\DirectoryExistsPlugin.js:27:15
at W:\domains\imobil\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:85:15
at processTicksAndRejections (internal/process/task_queues.js:75:11)
 @ ./resources/js/components/Pages/main/Services/style.scss 2:26-239
 @ ./resources/js/components/Pages/main/Services/index.js
 @ ./resources/js/components/Pages/main/Content.js
 @ ./resources/js/app.js
 @ multi ./resources/js/app.js ./resources/sass/app.scss

ERROR in ./resources/js/components/Pages/Banner/style.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src??ref--7-2!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./resources/js/components/Pages/Banner/style.scss)

Module build failed (from ./node_modules/css-loader/dist/cjs.js):
Error: Can't resolve '/img/cities-chat.png' in 'W:\domains\imobil\resources\js\components\Pages\Banner'
....
Jun
21
4 months ago
Activity icon

Started a new Conversation Filtering With Pagination

I've stumbled upon some troubles. I have 3 tables and have to make pagination fore each. But I get my data one request

Controller

  if(\App\User::where('id', Auth::id())->first()->group_store == 'admin') $data = Proposal::all();
        else $data = Proposal::where('user_id', Auth::id())->get();

        $new = $data->filter(function ($item) {
            if ($item->state == 'new') return $item;
        })->values();

        $paid = $data->filter(function ($item) {
            if ($item->state == 'paid') return $item;
        })->values();

        $error = $data->filter(function ($item) {
            if ($item->state == 'error') return $item;
        })->values();

        return view('dashboard.proposal')->with([
            'proposals_paid' => $paid,
            'proposals_new' => $new,
            'proposals_error' => $error,
            'menu' => \App\User::where('id', Auth::id())->get(),
        ]);

Blade

@section('content')
    <div class="container">
        <p style="color: #FFFFFF">For Checking</p>
        <table class="table" style="background: white">
            <thead class="thead-light">
            <tr>
                <th scope="col">Status</th>
                <th scope="col">#</th>
                <th scope="col">Payment System</th>
                <th scope="col">Sender</th>
                <th scope="col">Recipient</th>
                <th scope="col">Amount, $</th>
                <th scope="col">Date</th>
                <th scope="col"></th>
            </tr>
            </thead>
            <tbody>
            @foreach($proposals_error as $p)
                <tr>
                    <th scope="row">{{ $p->status_full }}</th>
                    <td>{{ $p->id }}</td>
                    <td>{{ $p->payment_system }}</td>
                    <td>{{ $p->sender }}</td>
                    <td>{{ $p->recipient }}</td>
                    <td>{{ $p->amount }}</td>
                    <td>{{ date('d M, Y H:i', strtotime($p->created_at)) }}</td>
                    <td>
                        <a href="" class="btn btn-danger">Change price</a>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
    <div class="container">
        <p style="color: #FFFFFF">New</p>
        <table class="table" style="background: white">
            <thead class="thead-light">
            <tr>
                <th scope="col">Status</th>
                <th scope="col">#</th>
                <th scope="col">Payment System</th>
                <th scope="col">Sender</th>
                <th scope="col">Recipient</th>
                <th scope="col">Amount, $</th>
                <th scope="col">Date</th>
                <th scope="col"></th>
            </tr>
            </thead>
            <tbody>
            @foreach($proposals_new as $p)
                <tr>
                    <th scope="row">{{ $p->status_full }}</th>
                    <td>{{ $p->id }}</td>
                    <td>{{ $p->payment_system }}</td>
                    <td>{{ $p->sender }}</td>
                    <td>{{ $p->recipient }}</td>
                    <td>{{ $p->amount }}</td>
                    <td>{{ date('d M, Y H:i', strtotime($p->created_at)) }}</td>
                    <td>
                        <a href="" class="btn btn-danger">Change price</a>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>

    <div class="container">
        <p style="color: #FFFFFF">Awaiting</p>
        <table class="table" style="background: white">
            <thead class="thead-light">
            <tr>
                 <th scope="col">Status</th>
                <th scope="col">#</th>
                <th scope="col">Payment System</th>
                <th scope="col">Sender</th>
                <th scope="col">Recipient</th>
                <th scope="col">Amount, $</th>
                <th scope="col">Date</th>
                <th scope="col"></th>
            </tr>
            </thead>
            <tbody>
            @foreach($proposals_paid as $p)
                <tr>
                    <th scope="row">{{ $p->status_full }}</th>
                    <td>{{ $p->id }}</td>
                    <td>{{ $p->payment_system }}</td>
                    <td>{{ $p->sender }}</td>
                    <td>{{ $p->recipient }}</td>
                    <td>{{ $p->amount }}</td>
                    <td>{{ date('d M, Y H:i', strtotime($p->created_at)) }}</td>
                    <td>
                        <a href="" class="btn btn-danger">Change price</a>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
@endsection

How can i make pagination for each table. Thanks!

May
27
5 months ago
Activity icon

Started a new Conversation AmCharts Js Create The Same Schedule

Hi, Could you help me pls to create the same schedule with amCharts js http://prntscr.com/soq9pf

Thanks a lot

May
26
5 months ago
Activity icon

Started a new Conversation Get Information On Certain Days Of The Last Week

Hi, I'm a beginner in laravel, therefore I need you help ,pls I need to get the dates of the previous week. For instance: It is now 26.05, so a week ago it was 19.05. Thus, I need to write the dates 20,21,22,23,24,25,26 into array.

Also, a I have relations between store and profit, have to get amount of the previous week, whether amount exists in that day or no. If we didn't get any profit, have to return 0. After that, i return all data to chartJs.

//take dates
$data = [];
        if (Carbon::today()->subDays(6)->day < Carbon::today()->day)
            for ($i = Carbon::today()->subDays(6)->day; $i <= Carbon::today()->day; $i++)
                $data[] = $i;
//return object & profits for certain store
$store = \App\Store::with('profit')->where('user_id', Auth::id())
            ->chunk(50, function($records) use (&$profitArr) {
            foreach ($records as $record) {
                $profitArr[] = array(
                    'id' => $record->id,
                    'title' => $record->name,
                    'currency' => $record->currency,
                    'amount' =>  !empty($record->profit) ? $record->profit()->whereDate('created_at', '>=', Carbon::today()->subDays(7))->get(['amount']) : 0
                );
            }
        });


        return response()->json([
            'days' => $data,
            'chartjs' => $profitArr,
        ]);